Filtered Trend Levels with FibonacciCurrent Timeframe Check: I added isCurrentTimeframe to only display Fibonacci levels, trend labels, and other elements when the current timeframe matches the chart’s timeframe.
For example, this will show the Fibonacci levels only on a "5-minute" timeframe if timeframe.period == "5" or on a daily chart if timeframe.period == "1D".
Limit to Current Timeframe: All the labels and shapes (for Fibonacci levels, HH/HL, etc.) will only be shown if the isCurrentTimeframe condition is true, which ensures they only appear on the active timeframe.
How to Use:
Change your chart to different time frames (e.g., 5-minute, 1-hour, or daily).
The labels and circles will only show up when the script is applied to that specific timeframe.
This version ensures that only the relevant data for the currently active time frame is displayed, while you can also adjust the Fibonacci levels as needed.
Let me know if this works for you!
Forecasting
Share SizeA helpful tool that estimates the amount of times you can trade at your current share size in a small account.
You can adjust the numbers in the settings page!
MOLThis is a very useful indicator for drawing multiple lines.
I use it a lot to create balancing levels.
This version comes with labels that can be removed by making the color completely transparent.
There is also a version without labels available upon request.
One Trading Setup for Life ICT [TradingFinder] Sweep Session FVG🔵 Introduction
ICT One Trading Setup for Life is a trading strategy based on liquidity and market structure shifts, utilizing the PM Session Sweep to determine price direction. In this strategy, the market first forms a price range during the PM Session (from 13:30 to 16:00 EST), which includes the highest high (PM Session High) and lowest low (PM Session Low).
In the next session, the price first touches one of these levels to trigger a Liquidity Hunt before confirming its trend by breaking the Change in State of Delivery (CISD) Level. After this confirmation, the price retraces toward a Fair Value Gap (FVG) or Order Block (OB), which serve as the best entry points in alignment with liquidity.
In financial markets, liquidity is the primary driver of price movement, and major market participants such as institutional investors and banks are constantly seeking liquidity at key levels. This process, known as Liquidity Hunt or Liquidity Sweep, occurs when the price reaches an area with a high concentration of orders, absorbs liquidity, and then reverses direction.
In this setup, the PM Session range acts as a trading framework, where its highs and lows function as key liquidity zones that influence the next session’s price movement. After the New York market opens at 9:30 EST, the price initially breaks one of these levels to capture liquidity.
However, for a trend shift to be confirmed, the CISD Level must be broken.
Once the CISD Level is breached, the price retraces toward an FVG or OB, which serve as optimal trade entry points.
Bullish Setup :
Bearish Setup :
🔵 How to Use
In this strategy, the PM Session range is first identified, which includes the highest high (PM Session High) and lowest low (PM Session Low) between 13:30 and 16:00 EST. In the following session, the price touches one of these levels for a Liquidity Hunt, followed by a break of the Change in State of Delivery (CISD) Level. The price then retraces toward a Fair Value Gap (FVG) or Order Block (OB), creating a trading opportunity.
This process can occur in two scenarios : bearish and bullish setups.
🟣 Bullish Setup
In a bullish scenario, the PM Session High and PM Session Low are identified. In the following session, the price first breaks the PM Session Low, absorbing liquidity. This process results in a Fake Breakout to the downside, misleading retail traders into taking short positions.
After the Liquidity Hunt, the CISD Level is broken, confirming a trend reversal. The price then retraces toward an FVG or OB, offering an optimal long entry opportunity.
The initial take-profit target is the PM Session High, but if higher timeframe liquidity levels exist, extended targets can be set.
The stop-loss should be placed below the Fake Breakout low or the first candle of the FVG.
🟣 Bearish Setup
In a bearish scenario, the market first defines its PM Session High and PM Session Low. In the next session, the price initially breaks the PM Session High, triggering a Liquidity Hunt. This movement often causes a Fake Breakout, misleading retail traders into taking incorrect positions.
After absorbing liquidity, the CISD Level breaks, indicating a shift in market structure. The price then retraces toward an FVG or OB, offering the best short entry opportunity.
The initial take-profit target is the PM Session Low, but if additional liquidity exists on higher timeframes, lower targets can be considered.
The stop-loss should be placed above the Fake Breakout high or the first candle of the FVG.
🔵 Setting
CISD Bar Back Check : The Bar Back Check option enables traders to specify the number of past candles checked for identifying the CISD Level, enhancing CISD Level accuracy on the chart.
Order Block Validity : The number of candles that determine the validity of an Order Block.
FVG Validity : The duration for which a Fair Value Gap remains valid.
CISD Level Validity : The duration for which a CISD Level remains valid after being broken.
New York PM Session : Defines the PM Session range from 13:30 to 16:00 EST.
New York AM Session : Defines the AM Session range from 9:30 to 16:00 EST.
Refine Order Block : Enables finer adjustments to Order Block levels for more accurate price responses.
Mitigation Level OB : Allows users to set specific reaction points within an Order Block, including: Proximal: Closest level to the current price. 50% OB: Midpoint of the Order Block. Distal: Farthest level from the current price.
FVG Filter : The Judas Swing indicator includes a filter for Fair Value Gap (FVG), allowing different filtering based on FVG width: FVG Filter Type: Can be set to "Very Aggressive," "Aggressive," "Defensive," or "Very Defensive." Higher defensiveness narrows the FVG width, focusing on narrower gaps.
Mitigation Level FVG : Like the Order Block, you can set price reaction levels for FVG with options such as Proximal, 50% OB, and Distal.
Demand Order Block : Enables or disables bullish Order Block.
Supply Order Block : Enables or disables bearish Order Blocks.
Demand FVG : Enables or disables bullish FVG.
Supply FVG : Enables or disables bearish FVGs.
Show All CISD : Enables or disables the display of all CISD Levels.
Show High CISD : Enables or disables high CISD levels.
Show Low CISD : Enables or disables low CISD levels.
🔵 Conclusion
The ICT One Trading Setup for Life is a liquidity-based strategy that leverages market structure shifts and precise entry points to identify high-probability trade opportunities. By focusing on PM Session High and PM Session Low, this setup first captures liquidity at these levels and then confirms trend shifts with a break of the Change in State of Delivery (CISD) Level.
Entering a trade after a retracement to an FVG or OB allows traders to position themselves at optimal liquidity levels, ensuring high reward-to-risk trades. When used in conjunction with higher timeframe bias, order flow, and liquidity analysis, this strategy can become one of the most effective trading methods within the ICT Concept framework.
Successful execution of this setup requires risk management, patience, and a deep understanding of liquidity dynamics. Traders can enhance their confidence in this strategy by conducting extensive backtesting and analyzing past market data to optimize their approach for different assets.
LL Moving Averages with Controlled Price LabelsThis is an indicator for two user-defined moving averages, with default settings of 10 and 100 periods. It includes labels for buy and sell signals at key crossover points. With a label indicating a price increase of 100 points from the buy entry or a decrease of 100 points from the sell entry. The label will say "+100" or "-100" when these conditions are met.
NTS Forex (NewStrategy) //@version=5
indicator('NTS Forex (NewStrategy) ',overlay = true)
//---------------------- Engulfing ------------------------------
//barcolor(open > close ? close > open ? close >= open ? close >= open ? close - open > open - close ? color.yellow :na :na : na : na : na)
//-----------------------------------------------------------------
var timeF = timeframe.period
getResolution(tf) =>
switch tf
'1' => '3'
'3' => '5'
'5' => '15'
'15'=> '15'
'30'=> '45'
'45'=> '60'
'60'=> '120'
'120'=> '180'
'180'=> '240'
'240'=> 'D'
'D'=> 'W'
'W'=> 'M'
var atrP = 10
var atrF = 5
res = getResolution(timeF)
trailType = input.string('modified', 'Trailtype', options= )
var int ATRPer = 0
var int ATRFac = 0
if timeF == '45'
ATRPer := 12
ATRFac := 12
else if timeF == '15'
ATRPer := 9
ATRFac := 9
else
ATRPer := 7
ATRFac := 7
manualFts = input.bool(false, title = 'use manual FTS')
ATRPeriod = manualFts ? input.int(15, title = 'ATRPeriod') : ATRPer
ATRFactor = manualFts ? input.int(15, title = 'ATRFactor') : ATRFac
var testTable = table.new(position=position.bottom_left, columns=2, rows=4, bgcolor=color.new(color.gray,50), border_width=2, border_color=color.black)
if barstate.islast
table.cell(testTable, 0, 0, 'Chart Time',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 0, timeF,text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 1, 'NTS Time',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 1, res,text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 2, 'ATRPeriod',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 2, str.tostring(ATRPeriod),text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 3, 'ATRFactor',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 3, str.tostring(ATRFactor),text_color = color.green,text_size = size.small)
norm_o = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, open)
norm_h = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, high)
norm_l = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, low)
norm_c = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, close)
Wild_ma(_src, _malength) =>
_wild = 0.0
_wild := nz(_wild ) + (_src - nz(_wild )) / _malength
_wild
/////////// TRUE RANGE CALCULATIONS /////////////////
HiLo = math.min(norm_h - norm_l, 1.5 * nz(ta.sma(norm_h - norm_l, ATRPeriod)))
HRef = norm_l <= norm_h ? norm_h - norm_c : norm_h - norm_c - 0.5 * (norm_l - norm_h )
LRef = norm_h >= norm_l ? norm_c - norm_l : norm_c - norm_l - 0.5 * (norm_l - norm_h)
trueRange = trailType == 'modified' ? math.max(HiLo, HRef, LRef) : math.max(norm_h - norm_l, math.abs(norm_h - norm_c ), math.abs(norm_l - norm_c ))
loss = ATRFactor * Wild_ma(trueRange, ATRPeriod)
Up = norm_c - loss
Dn = norm_c + loss
TrendUp = Up
TrendDown = Dn
Trend = 1
TrendUp := norm_c > TrendUp ? math.max(Up, TrendUp ) : Up
TrendDown := norm_c < TrendDown ? math.min(Dn, TrendDown ) : Dn
Trend := norm_c > TrendDown ? 1 : norm_c < TrendUp ? -1 : nz(Trend , 1)
trail = Trend == 1 ? TrendUp : TrendDown
ex = 0.0
ex := ta.crossover(Trend, 0) ? norm_h : ta.crossunder(Trend, 0) ? norm_l : Trend == 1 ? math.max(ex , norm_h) : Trend == -1 ? math.min(ex , norm_l) : ex
state = Trend == 1 ? 'long' : 'short'
fib1Level = 61.8
fib2Level = 78.6
fib3Level = 88.6
f1 = ex + (trail - ex) * fib1Level / 100
f2 = ex + (trail - ex) * fib2Level / 100
f3 = ex + (trail - ex) * fib3Level / 100
l100 = trail + 0
Fib1 = plot(f1, 'Fib 1', style=plot.style_line, color=color.new(#ff7811, 0))
Fib2 = plot(f2, 'Fib 2', style=plot.style_line, color=color.new(color.gray, 0))
Fib3 = plot(f3, 'Fib 3', style=plot.style_line, color=color.new(#00ff3c, 0))
L100 = plot(l100, 'l100', style=plot.style_line, color=color.rgb(120, 123, 134))
fill(Fib3, L100, color=state == 'long' ? color.new(#00eaff, 12) : state == 'short' ? #ff5280e9 : na)
changcDir = ta.cross(f3,l100)
alertcondition(changcDir, title="Alert: FTS Direction Change", message="FTS has changed direction!")
l1 = state == "long" and ta.crossunder(norm_c, f1 )
l2 = state == "long" and ta.crossunder(norm_c, f2 )
l3 = state == "long" and ta.crossunder(norm_c, f3 )
s1 = state == "short" and ta.crossover(norm_c, f1 )
s2 = state == "short" and ta.crossover(norm_c, f2 )
s3 = state == "short" and ta.crossover(norm_c, f3 )
atr = ta.sma(trueRange, 14)
//////////// FIB ALERTS /////////////////////
alertcondition(l1, title = "cross over Fib1", message = "Price crossed below Fib1 level in long trend")
alertcondition(l2, title = "cross over Fib2", message = "Price crossed below Fib2 level in long trend")
alertcondition(l3, title = "cross over Fib3", message = "Price crossed below Fib3 level in long trend")
alertcondition(s1, title = "cross under Fib1", message = "Price crossed above Fib1 level in short trend")
alertcondition(s2, title = "cross under Fib2", message = "Price crossed above Fib2 level in short trend")
alertcondition(s3, title = "cross under Fib3", message = "Price crossed above Fib3 level in short trend")
alertcondition(fixnan(f1)!=fixnan(f1 ), title = "Stop Line Change", message = "Stop Line Change")
Multi-timeframe Difference Forecast (MTD)Description:
The Multi-timeframe Difference Forecast indicator projects potential future price levels by comparing open prices across multiple timeframe pairs. It uses 12 predefined timeframe pairs where each pair consists of a lower and a higher timeframe. For each pair, the indicator calculates a forecast value by adding the difference between the lower timeframe’s open and the higher timeframe’s open to the current bar’s close. These forecast values are then plotted as points into the future and connected by blue line segments, forming a continuous projection line on your chart.
How It Works:
Timeframe Pairs:
The indicator defines 12 pairs. For example:
Pair 1: Lower timeframe = 15 minutes; Higher timeframe = 150 minutes
Pair 2: Lower timeframe = 30 minutes; Higher timeframe = 165 minutes
⋮
Pair 12: Lower timeframe = 180 minutes; Higher timeframe = 720 minutes
Forecast Calculation:
For each pair, the forecast is computed as:
forecast = close + (lower timeframe open - higher timeframe open)
This produces a series of forecast values that are then plotted on the chart.
Time Offset:
Each forecast point is offset into the future by a number of bars calculated as the ratio between the lower timeframe’s duration (in seconds) and the current chart’s timeframe (in seconds). This adjustment helps align the forecast points correctly on the time axis.
Visualization:
The indicator draws blue lines (width = 2) connecting the current price to each forecast point sequentially, forming a polyline that visually represents the projected price trajectory.
How to Use:
Overlay on Chart:
Apply this indicator to any chart, and it will automatically overlay the forecast line on your current price chart.
Timeframe Flexibility:
The calculations adjust to the chart’s timeframe, so you can use it on various timeframes without needing to change the code.
Interpretation:
The forecast line is intended to provide a visual estimate of potential future price movement based on historical open price differences. It is meant to serve as an additional analytical tool rather than a standalone trading signal.
Disclaimer:
This script is provided for educational and informational purposes only and should not be construed as financial or trading advice. Trading involves significant risk, and past performance is not indicative of future results. You should perform your own analysis and consult with a qualified professional before making any trading decisions. Use this indicator at your own risk.
Ultimate T3 Fibonacci for BTC Scalping. Look at backtest report!Hey Everyone!
I created another script to add to my growing library of strategies and indicators that I use for automated crypto trading! This strategy is for BITCOIN on the 30 minute chart since I designed it to be a scalping strategy. I calculated for trading fees, and use a small amount of capital in the backtest report. But feel free to modify the capital and how much per order to see how it changes the results:)
It is called the "Ultimate T3 Fibonacci Indicator by NHBprod" that computes and displays two T3-based moving averages derived from price data. The t3_function calculates the Tilson T3 indicator by applying a series of exponential moving averages to a combined price metric and then blending these results with specific coefficients derived from an input factor.
The script accepts several user inputs that toggle the use of the T3 filter, select the buy signal method, and set parameters like lengths and volume factors for two variations of the T3 calculation. Two T3 lines, T3 and T32, are computed with different parameters, and their colors change dynamically (green/red for T3 and blue/purple for T32) based on whether the lines are trending upward or downward. Depending on the selected signal method, the script generates buy signals either when T32 crosses over T3 or when the closing price is above T3, and similarly, sell signals are generated on the respective conditions for crossing under or closing below. Finally, the indicator plots the T3 lines on the chart, adds visual buy/sell markers, and sets alert conditions to notify users when the respective trading signals occur.
The user has the ability to tune the parameters using TP/SL, date timerames for analyses, and the actual parameters of the T3 function including the buy/sell signal! Lastly, the user has the option of trading this long, short, or both!
Let me know your thoughts and check out the backtest report!
Combined SmartComment & Dynamic S/R LevelsDescription:
The Combined SmartComment & Dynamic S/R Levels script is designed to provide valuable insights for traders using TradingView. It integrates dynamic support and resistance levels with a powerful Intelligent Comment system to enhance decision-making. The Intelligent Comment feature generates market commentary based on key technical indicators, delivering real-time actionable feedback that helps optimize trading strategies.
Intelligent Comment Feature:
The Intelligent Comment function continuously analyzes market conditions and offers relevant insights based on combinations of various technical indicators such as RSI, ATR, MACD, WMA, and others. These comments help traders identify potential price movements, highlighting opportunities to buy, sell, or wait.
Examples of the insights provided by the system include:
RSI in overbought/oversold and price near resistance/support: Indicates potential price reversal points.
Price above VAH and volume increasing: Suggests a strengthening uptrend.
Price near dynamic support/resistance: Alerts when price approaches critical support or resistance zones.
MACD crossovers and RSI movements: Provide signals for potential trend shifts or continuations.
Indicators Used:
RSI (Relative Strength Index)
ATR (Average True Range)
MACD (Moving Average Convergence Divergence)
WMA (Weighted Moving Average)
POC (Point of Control)
Bollinger Bands
SuperSignal
Volume
EMA (Exponential Moving Average)
Dynamic Support/Resistance Levels
How It Works:
The script performs real-time market analysis, assessing multiple technical indicators to generate Intelligent Comments. These comments provide traders with timely guidance on potential market movements, assisting with decision-making in a dynamic market environment. The script also integrates dynamic support and resistance levels to further enhance trading accuracy.
Time Zone & SessionsDa las sesiones de London, New York, Asia y Austr.
Además un time zone incorporado para marcar días
GOLD Volume-Based Entry StrategyShort Description:
This script identifies potential long entries by detecting two consecutive bars with above-average volume and bullish price action. When these conditions are met, a trade is entered, and an optional profit target is set based on user input. This strategy can help highlight momentum-driven breakouts or trend continuations triggered by a surge in buying volume.
How It Works
Volume Moving Average
A simple moving average of volume (vol_ma) is calculated over a user-defined period (default: 20 bars). This helps us distinguish when volume is above or below recent averages.
Consecutive Green Volume Bars
First bar: Must be bullish (close > open) and have volume above the volume MA.
Second bar: Must also be bullish, with volume above the volume MA and higher than the first bar’s volume.
When these two bars appear in sequence, we interpret it as strong buying pressure that could drive price higher.
Entry & Profit Target
Upon detecting these two consecutive bullish bars, the script places a long entry.
A profit target is set at current price plus a user-defined fixed amount (default: 5 USD).
You can adjust this target, or you can add a stop-loss in the script to manage risk further.
Visual Cues
Buy Signal Marker appears on the chart when the second bar confirms the signal.
Green Volume Columns highlight the bars that fulfill the criteria, providing a quick visual confirmation of high-volume bullish bars.
Works fine on 1M-2M-5M-15M-30M. Do not use it on higher TF. Due the lack of historical data on lower TF, the backtest result is limited.
Dynamic 200 EMA with Trend-Based ColoringDescription:
This script plots the 200-period Exponential Moving Average (EMA) and dynamically changes its color based on the trend direction. The script helps traders quickly identify whether the price is above or below the 200 EMA, which is widely used as a long-term trend indicator.
How It Works:
The script calculates the 200 EMA based on the closing price.
If the price is above the EMA, it suggests a bullish trend, and the EMA line turns green.
If the price is below the EMA, it suggests a bearish trend, and the EMA line turns red.
An optional background color is added to enhance visual clarity, highlighting the current trend direction.
Use Cases:
Trend Confirmation: Helps traders determine if the overall trend is bullish or bearish.
Support and Resistance: The 200 EMA is often used as dynamic support/resistance.
Entry & Exit Signals: Traders can use crossovers with the 200 EMA as potential trade signals.
This script is designed for traders looking for a simple yet effective way to incorporate trend visualization into their charts. It is fully open-source and can be customized to fit individual trading strategies.
RSI XTR with selective candle color by Edwin KThis tradingView indicator named "RSI XTR with selective candle color", which modifies the candle colors on the chart based on RSI (Relative Strength Index) conditions. Here's how it works:
- rsiPeriod: Defines the RSI calculation period (default = 5).
- rsiOverbought: RSI level considered overbought (default = 70).
- rsiOversold: RSI level considered oversold (default = 30).
- These values can be modified by the user in the settings.
RSI Calculation
- Computes the RSI value using the ta.rsi() function on the closing price (close).
- The RSI is a momentum indicator that measures the magnitude of recent price changes.
Conditions for Candle Coloring
- when the RSI is above the overbought level.
- when the RSI is below the oversold level.
How It Works in Practice
- When the RSI is above 70 (overbought) → Candles turn red.
- When the RSI is below 30 (oversold) → Candles turn green.
- If the RSI is between 30 and 70, the candle keeps its default color.
This helps traders quickly spot potential reversal zones based on RSI momentum.
EMA & Bollinger BandsThis indicator combines three main functionalities into a single script:
1. Exponential Moving Average (EMA):
- Purpose: Calculates and plots the EMA of a chosen price source.
- Inputs:
- EMA Length: The period for the EMA calculation.
- EMA Source: The price series (such as close) used for the EMA.
- EMA Offset: Allows shifting the EMA line left or right on the chart.
- Output: A blue-colored EMA line plotted on the chart.
2. Smoothing MA on EMA:
- Purpose: Applies a secondary moving average (MA) on the previously calculated EMA. There is also an option to overlay Bollinger Bands on this smoothed MA.
- Inputs:
- Smoothing MA Type: Options include "None", "SMA", "SMA + Bollinger Bands", "EMA", "SMMA (RMA)", "WMA", and "VWMA".
- Selecting "None" disables this feature.
- Choosing "SMA + Bollinger Bands" will additionally plot Bollinger Bands around the smoothed MA.
- Smoothing MA Length: The period used to calculate the smoothing MA.
- BB StdDev for Smoothing MA: The standard deviation multiplier for the Bollinger Bands (applies only when "SMA + Bollinger Bands" is selected).
- Calculation Details:
- The chosen MA type is applied to the EMA value.
- If Bollinger Bands are enabled, the script computes the standard deviation of the EMA over the smoothing period, multiplies it by the specified multiplier, and then plots an upper and lower band around the smoothing MA.
- Output:
- A yellow-colored smoothing MA line.
- Optionally, green-colored upper and lower Bollinger Bands with a filled background if the "SMA + Bollinger Bands" option is selected.
3. Bollinger Bands on Price:
- Purpose: Independently calculates and plots traditional Bollinger Bands based on a moving average of a selected price source.
- Inputs:
- BB Length: The period for calculating the moving average that serves as the basis of the Bollinger Bands.
- BB Basis MA Type: The type of moving average to use (options include SMA, EMA, SMMA (RMA), WMA, and VWMA).
- BB Source: The price series (such as close) used for the Bollinger Bands calculation.
- BB StdDev: The multiplier for the standard deviation used to calculate the upper and lower bands.
- BB Offset: Allows shifting the Bollinger Bands left or right on the chart.
- Calculation Details:
- The script computes a basis line using the selected MA type on the chosen price source.
- The standard deviation of the price over the specified period is then multiplied by the provided multiplier to determine the distance for the upper and lower bands.
- Output:
- A basis line (typically drawn in a blue tone), an upper band (red), and a lower band (teal).
- The area between the upper and lower bands is filled with a semi-transparent blue background for easier visualization.
---
How It Works Together
- Integration:
The script is divided into clearly labeled sections for each functionality. All parts are drawn on the same chart (overlay mode enabled), providing a comprehensive view of market trends.
- Customization:
Users can adjust parameters for the EMA, the smoothing MA (and its optional Bollinger Bands), as well as the traditional Bollinger Bands independently. This allows for flexible customization depending on the trader's strategy or visual preference.
- Utility:
Combining these three analyses into one indicator enables traders to view:
- The immediate trend via the EMA.
- A secondary smoothed trend that might help reduce noise.
- A volatility measure through Bollinger Bands on both the price and the smoothed EMA.
---
This combined indicator is useful for technical analysis by providing both trend-following (EMA and smoothing MA) and volatility indicators (Bollinger Bands) in one streamlined tool.
DCA KuCoin Strategy Backtesting [ScrimpleAI]This script is a backtester for a Dollar Cost Averaging (DCA) strategy on KuCoin, developed for TradingView. It allows users to simulate recurring investments in an asset, test different configurations, and find the best parameters to maximize performance. The script provides a detailed simulation of a DCA strategy, analyzing the impact of different configurations on investments over time. It is designed to be open-source on TradingView, offering a free tool to optimize the use of DCA bots on KuCoin.
Strategy Settings
The script uses an initial capital of 10,000 euros and sets a commission of 0.07 percent per trade. The invested amount is set as a percentage of equity, supporting up to 100 open trades simultaneously. Orders are processed at the close of each candle, and trading is conducted in euros.
Customizable Parameters
The script allows users to choose the investment interval, ranging from a minimum of one hour to a maximum of two weeks. Users can set the amount invested per trade, with a default value of 1,000 USDT and a minimum of 2 USDT. A maximum investment limit can also be defined, preventing further trades once this limit is reached. Additionally, a profit target is available, expressed as a percentage, indicating the profit level at which all positions will be closed.
Backtesting Period Selection
Users can select a specific time range to test the strategy. The bot will execute trades only within this period.
Strategy Logic
The bot makes the first purchase when no trades are open, using the current closing price to calculate the quantity of assets to buy. Subsequent purchases occur at the specified frequency, provided the invested capital does not exceed the set maximum limit. When total equity surpasses the initial value plus the profit target, the bot closes all positions to secure the profit. A check is implemented to prevent errors related to opening and closing trades simultaneously.
Error Management
The script ensures that the selected timeframe is compatible with the chosen investment interval. If the timeframe is too high compared to the investment frequency, an error is triggered. Additionally, if available capital becomes negative, the script stops execution and suggests modifying the test parameters.
John Bob-Trading-BotDeveloped by Ayebale John Bob with the help of his bestie, this innovative strategy combines advanced Smart Money Concepts with practical risk management tools to help traders identify and capitalize on key market moves.
Key Features:
Smart Money Concepts & Fair Value Gaps (FVG):
The strategy monitors price action for fair value gaps, which are visualized as extremely faint horizontal lines on the chart. These FVGs signal potential areas where institutional traders might have entered or exited positions.
Dynamic Entry Signals:
Buy signals are triggered when the price crosses above the 50-bar lowest low or when a bullish FVG is detected. Conversely, sell signals are generated when the price falls below the 50-bar highest high or a bearish FVG is identified. Each signal is visually marked on the chart with clear buy (green) and sell (red) labels.
Multi-Level Order Execution:
Once an entry signal occurs, the strategy places five separate orders, each with its own take-profit (TP) level. The TP levels are calculated dynamically using the Average True Range (ATR) and a set of predefined multipliers. This allows traders to scale out of positions as the market moves favorably.
Dynamic Risk Management:
A stop-loss is automatically set at a distance determined by the ATR, ensuring that risk is managed in accordance with current market volatility.
Real-Time Trade Information Table:
In the bottom-right corner of the chart, a trade information table displays essential details about the current trade:
Side: Displays "BUY NOW" (with a dark green background) for long entries or "SELL NOW" (with a dark red background) for short entries.
Entry Price & Stop-Loss: Shows the entry price (highlighted in green) and the corresponding stop-loss level (highlighted in red).
Take-Profit Levels: Lists the five TP levels, each of which turns green once the market price reaches that target.
Timer: A live timer in minutes counts from the moment the current trade trigger started, helping traders track the duration of their active trades.
Visual Progress Bar:
A histogram-style progress bar is plotted on the chart, visually representing the percentage gain (or loss) relative to the entry price.
This strategy was meticulously designed to incorporate both technical analysis and smart risk management, offering a robust trading solution that adapts to changing market conditions. Whether you're a seasoned trader or just starting out, the AyebaleJohnBob Trading Bot equips you with the tools and visual cues needed to make well-informed trading decisions. Enjoy a seamless blend of strategy and style—crafted with passion by Ayebale John Bob and his bestie!
First 9:15-9:20 Candle Levels (Daily)This indicator captures the closing price of the first 5-minute candle (9:15 - 9:20 AM) every trading day. It then calculates 0.09% above and below this closing price and plots horizontal lines. The indicator resets daily at 9:15 AM, ensuring it always tracks the latest market open. After 9:20 AM, the calculated levels remain visible throughout the day. The upper level is displayed in green, while the lower level is in red. This tool helps traders identify key price levels early in the session, useful for setting stop-losses, take-profit zones, or identifying potential breakout points.
Machine Learning SupertrendThe Machine Learning Supertrend is an advanced trend-following indicator that enhances the traditional Supertrend with Gaussian Process Regression (GPR) and kernel-based learning. Unlike conventional methods that rely purely on historical ATR values, this indicator integrates machine learning techniques to dynamically estimate volatility and forecast future price movements, resulting in a more adaptive and robust trend detection system.
At the core of this indicator lies Gaussian Process Regression (GPR), which utilizes a Radial Basis Function (RBF) kernel to model price distributions and anticipate future trends. Instead of simply looking at past price action, it constructs a kernel matrix, enabling a probabilistic approach to price forecasting. This allows the indicator to not only detect current trends but also project potential trend reversals with greater accuracy.
By applying machine learning to ATR estimation, the ML Supertrend dynamically adjusts its thresholds based on predicted values rather than a fixed multiplier. This makes the trend signals more responsive to market conditions, reducing false signals and minimizing whipsaws often seen with traditional Supertrend indicators. The upper and lower bands are no longer static but evolve based on the underlying price structure, improving the reliability of trend shifts.
When the price crosses these adaptive levels, the indicator detects a trend change and plots it accordingly. Green signifies a bullish trend, while red indicates a bearish one. Alerts can also be triggered when the trend shifts, allowing traders to react quickly to potential reversals.
What makes this approach powerful is its ability to adapt to different market conditions. Traditional ATR-based methods use fixed parameters that might not always be optimal, whereas this ML-driven Supertrend continuously refines its estimations based on real-time data. The result is a more intelligent, less lagging, and highly adaptive trend-following tool.
This indicator is particularly useful for traders looking to enhance trend-following strategies with AI-driven insights. It reduces noise, improves signal reliability, and even offers a degree of trend forecasting, making it ideal for those who want a more advanced and dynamic alternative to standard Supertrend indicators.
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, and past performance is not indicative of future results. Trading involves risk, and users should conduct their own research and use proper risk management before making investment decisions.
Ultimate Stochastics Strategy by NHBprod Use to Day Trade BTCHey All!
Here's a new script I worked on that's super simple but at the same time useful. Check out the backtest results. The backtest results include slippage and fees/commission, and is still quite profitable. Obviously the profitability magnitude depends on how much capital you begin with, and how much the user utilizes per order, but in any event it seems to be profitable according to backtests.
This is different because it allows you full functionality over the stochastics calculations which is designed for random datasets. This script allows you to:
Designate ANY period of time to analyze and study
Choose between Long trading, short trading, and Long & Short trading
It allows you to enter trades based on the stochastics calculations
It allows you to EXIT trades using the stochastics calculations or take profit, or stop loss, Or any combination of those, which is nice because then the user can see how one variable effects the overall performance.
As for the actual stochastics formula, you get control, and get to SEE the plot lines for slow K, slow D, and fast K, which is usually not considered.
You also get the chance to modify the smoothing method, which has not been done with regular stochastics indicators. You get to choose the standard simple moving average (SMA) method, but I also allow you to choose other MA's such as the HMA and WMA.
Lastly, the user gets the option of using a custom trade extender, which essentially allows a buy or sell signal to exist for X amount of candles after the initial signal. For example, you can use "max bars since signal" to 1, and this will allow the indicator to produce an extra sequential buy signal when a buy signal is generated. This can be useful because it is possible that you use a small take profit (TP) and quickly exit a profitable trade. With the max bars since signal variable, you're able to reenter on the next candle and allow for another opportunity.
Let me know if you have any questions! Please take a look at the performance report and let me know your thoughts! :)
Gold Pro StrategyHere’s the strategy description in a chat format:
---
**Gold (XAU/USD) Trend-Following Strategy**
This **trend-following strategy** is designed for trading gold (XAU/USD) by combining moving averages, MACD momentum indicators, and RSI filters to capture sustained trends while managing volatility risks. The strategy uses volatility-adjusted stops to protect gains and prevent overexposure during erratic price movements. The aim is to take advantage of trending markets by confirming momentum and ensuring entries are not made at extreme levels.
---
**Key Components**
1. **Trend Identification**
- **50 vs 200 EMA Crossover**
- **Bullish Trend:** 50 EMA crosses above 200 EMA, and the price closes above the 200 EMA
- **Bearish Trend:** 50 EMA crosses below 200 EMA, and the price closes below the 200 EMA
2. **Momentum Confirmation**
- **MACD (12,26,9)**
- **Buy Signal:** MACD line crosses above the signal line
- **Sell Signal:** MACD line crosses below the signal line
- **RSI (14 Period)**
- **Bullish Zone:** RSI between 50-70 to avoid overbought conditions
- **Bearish Zone:** RSI between 30-50 to avoid oversold conditions
3. **Entry Criteria**
- **Long Entry:** Bullish trend, MACD bullish crossover, and RSI between 50-70
- **Short Entry:** Bearish trend, MACD bearish crossover, and RSI between 30-50
4. **Exit & Risk Management**
- **ATR Trailing Stops (14 Period):**
- Initial Stop: 3x ATR from entry price
- Trailing Stop: Adjusts to lock in profits as price moves favorably
- **Position Sizing:** 100% of equity per trade (high-risk strategy)
---
**Key Logic Flow**
1. **Trend Filter:** Use the 50/200 EMA relationship to define the market's direction
2. **Momentum Confirmation:** Confirm trend momentum with MACD crossovers
3. **RSI Validation:** Ensure RSI is within non-extreme ranges before entering trades
4. **Volatility-Based Risk Management:** Use ATR stops to manage market volatility
---
**Visual Cues**
- **Blue Line:** 50 EMA
- **Red Line:** 200 EMA
- **Green Triangles:** Long entry signals
- **Red Triangles:** Short entry signals
---
**Strengths**
- **Clear Trend Focus:** Avoids counter-trend trades
- **RSI Filter:** Prevents entering overbought or oversold conditions
- **ATR Stops:** Adapts to gold’s inherent volatility
- **Simple Rules:** Easy to follow with minimal inputs
---
**Weaknesses & Risks**
- **Infrequent Signals:** 50/200 EMA crossovers are rare
- **Potential Missed Opportunities:** Strict RSI criteria may miss some valid trends
- **Aggressive Position Sizing:** 100% equity allocation can lead to large drawdowns
- **No Profit Targets:** Relies on trailing stops rather than defined exit targets
---
**Performance Profile**
| Metric | Expected Range |
|----------------------|---------------------|
| Annual Trades | 4-8 |
| Win Rate | 55-65% |
| Max Drawdown | 25-35% |
| Profit Factor | 1.8-2.5 |
---
**Optimization Recommendations**
1. **Increase Trade Frequency**
Adjust the EMAs to shorter periods:
- `emaFastLen = input.int(30, "Fast EMA")`
- `emaSlowLen = input.int(150, "Slow EMA")`
2. **Relax RSI Filters**
Adjust the RSI range to:
- `rsiBullish = rsi > 45 and rsi < 75`
- `rsiBearish = rsi < 55 and rsi > 25`
3. **Add Profit Targets**
Introduce a profit target at 1.5% above entry:
```pine
strategy.exit("Long Exit", "Long",
stop=longStopPrice,
profit=close*1.015, // 1.5% target
trail_offset=trailOffset)
```
4. **Reduce Position Sizing**
Risk a smaller percentage per trade:
- `default_qty_value=25`
---
**Best Use Case**
This strategy excels in **strong trending markets** such as gold rallies during economic or geopolitical crises. However, during sideways or choppy market conditions, the strategy might require manual intervention to avoid false signals. Additionally, integrating fundamental analysis—like monitoring USD weakness or geopolitical risks—can enhance its effectiveness.
---
This strategy offers a balanced approach for trading gold, combining trend-following principles with risk management tailored to the volatility of the market.