
This is a powerful intraday scalping strategy that combines two SuperTrend systems: the Dynamic Pivot SuperTrend (based on dynamic pivot highs/lows and ATR-based bands) and the Classic SuperTrend (a traditional ATR-based trailing trend filter). By combining both systems, the strategy ensures strong trend confirmation before taking trades. This dual confirmation mechanism significantly reduces false signals, improving trading accuracy and profitability. The strategy utilizes ATR (Average True Range) to dynamically adjust stop losses and profit targets, making it adaptable to changing market volatility.
The core of this strategy lies in combining two different SuperTrend systems to obtain more reliable trading signals:
Pivot SuperTrend System:
pivotPeriod parameter)pivotCenterpivotATRMult) to create dynamic support and resistance bandspivotTrend)Classic SuperTrend System:
classicATRMult multiplier to create dynamic volatility bandsstTrend)Entry Conditions:
Stop Loss and Take Profit:
The code implements the complete logic of this strategy, including order management and visual indicators, making it easy to apply in actual trading.
Through deep analysis of the code, this strategy demonstrates the following significant advantages:
Dual Trend Confirmation Mechanism: By requiring confirmation from two SuperTrend systems simultaneously, false breakouts and erroneous signals are greatly reduced. This dual verification ensures that only strong trend changes trigger trading signals.
Dynamic Adaptive Parameters: The strategy’s stop losses and profit targets are calculated based on ATR, allowing them to automatically adjust according to actual market volatility. This means that in highly volatile markets, stop points will expand accordingly, while in less volatile markets they will tighten, effectively adapting to different market environments.
Pivot Point Trend Identification: Using dynamic pivot points rather than fixed price levels to determine trends allows the strategy to better capture real market structure changes and key reversal points.
Highly Visual: The strategy includes clear visual indicators, such as colored SuperTrend lines and buy/sell signal markers, allowing traders to easily identify trading opportunities.
Complete Risk Management: Integrated automatic stop loss and profit target settings eliminate the need for manual risk management, ensuring trading discipline is maintained.
Scalping Optimization: Designed specifically for 3-5 minute charts for short-term trading, it is very suitable for high-frequency trading environments and intraday volatility capture.
Preset Fund Management: The code has already set a default of using 10% of account equity for trading, helping to maintain appropriate position sizing and risk control.
Despite the well-designed strategy, there are still the following potential risks and limitations:
Rapid Reversal Risk: In highly volatile markets, prices may quickly reverse after triggering a signal, causing stop losses to be hit. Solution: Consider pausing trading during important economic data releases or periods of abnormal volatility.
Poor Performance in Ranging Markets: The dual SuperTrend system performs best in clear trends but may produce frequent false signals in range-bound markets. Solution: Add additional range market filters, such as ADX (Average Directional Index) or volatility thresholds.
Parameter Sensitivity: Strategy performance is highly dependent on multiple parameter settings (such as ATR periods and multipliers). Solution: Conduct extensive historical backtesting to find optimal parameter combinations for specific markets and timeframes.
Liquidity Dependence: As a short-term strategy, it may face slippage and execution issues in markets or periods with lower liquidity. Solution: Limit trading times to high liquidity periods, or add liquidity filters.
Consecutive Loss Risk: No strategy can guarantee a 100% win rate, and consecutive losing trades may occur. Solution: Implement daily maximum trade count and maximum loss limits to prevent overtrading and capital depletion.
Overfitting Risk: The strategy has multiple adjustable parameters, which can easily lead to overfitting and curve-fitting. Solution: Use out-of-sample testing and forward testing to validate parameter robustness.
Based on code analysis, here are possible optimization directions for this strategy:
Add Market Environment Filters: Integrate market type recognition mechanisms (such as ADX or volatility analysis) to automatically adjust the strategy to suit trending or ranging markets. Such optimization can significantly reduce losing trades in market environments unsuitable for scalping.
Optimize Parameter Adaptability: Implement a dynamic parameter adjustment mechanism to automatically optimize ATR multipliers and periods based on recent market performance. This will allow the strategy to better adapt to changing market conditions without manual intervention.
Integrate Volume Analysis: Add volume confirmation requirements to entry conditions to ensure price movements have sufficient market participation support. Volume is a key confirmatory indicator of price action and can significantly improve signal quality.
Time Filters: Implement filtering mechanisms based on trading sessions, only trading during the most active and profitable market periods. The code comments suggest trading during high volume hours (e.g., 9:15 AM – 2:30 PM), which can be directly programmed.
Stop Loss Strategy Improvements: Explore more sophisticated stop loss strategies, such as trailing stops or stops based on support/resistance levels, which may provide better risk management than simple ATR multipliers.
Machine Learning Optimization: Consider using machine learning algorithms to identify market conditions where the strategy performs best, or to optimize parameter selection based on historical data.
Multi-timeframe Confirmation: Add higher timeframe trend filters to ensure short-term trades align with larger trend directions, improving win rates and risk-reward ratios.
These optimizations will make the strategy more robust and better adapted to different market environments while maintaining its core advantages—dual trend confirmation and dynamic risk management.
The Dual SuperTrend Fusion Strategy with ATR-Adaptive Dynamic Stop-Loss is a well-designed short-term trading system that provides highly reliable trading signals by combining two independent SuperTrend indicators. The main advantage of this strategy is its dual confirmation mechanism, which greatly reduces false signals, while providing effective risk management through ATR-based dynamic stop losses and profit targets.
This strategy is particularly suitable for intraday scalpers, performing best on 3-5 minute charts during high liquidity trading sessions. However, users should be aware of potential limitations in ranging markets and consider implementing suggested optimizations, such as market environment filters and volume confirmation, to further enhance strategy performance.
With careful parameter tuning and appropriate risk management, this strategy can be a valuable tool in a trader’s arsenal, especially for active traders seeking to capture market volatility in short timeframes. The built-in visualization and alert functions in the code make it easy to implement and monitor, while the modular design of the strategy also provides a good foundation for future customization and improvements.
/*backtest
start: 2024-06-04 00:00:00
end: 2025-06-03 00:00:00
period: 3h
basePeriod: 3h
exchanges: [{"eid":"Futures_Binance","currency":"DOGE_USDT"}]
*/
//@version=6
strategy("🔥Scalping Fusion Strategy v6", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10, initial_capital=10000)
// === INPUTS ===
pivotPeriod = input.int(2, "Pivot Point Period", minval=1)
pivotATRPeriod = input.int(10, "Pivot ATR Period")
pivotATRMult = input.float(3.0, "Pivot ATR Multiplier", step=0.1)
classicATRPeriod = input.int(10, "Classic SuperTrend ATR Period")
classicATRMult = input.float(3.0, "Classic SuperTrend ATR Multiplier", step=0.1)
useClassicATR = input.bool(true, "Use Classic ATR Calculation")
stSource = input.source(hl2, "Classic SuperTrend Source")
slATRMult = input.float(1.5, "Stoploss ATR Multiplier")
tpATRMult = input.float(3.0, "Target ATR Multiplier")
// === PIVOT SUPER TREND LOGIC ===
ph = ta.pivothigh(high, pivotPeriod, pivotPeriod)
pl = ta.pivotlow(low, pivotPeriod, pivotPeriod)
var float pivotCenter = na
pivotPoint = not na(ph) ? ph : not na(pl) ? pl : na
if not na(pivotPoint)
pivotCenter := na(pivotCenter) ? pivotPoint : (pivotCenter * 2 + pivotPoint) / 3
pivotATR = ta.atr(pivotATRPeriod)
pivotUpper = pivotCenter - pivotATRMult * pivotATR
pivotLower = pivotCenter + pivotATRMult * pivotATR
var float trailPivotUp = na
var float trailPivotDown = na
var int pivotTrend = 0
trailPivotUp := close[1] > nz(trailPivotUp[1], pivotUpper) ? math.max(pivotUpper, nz(trailPivotUp[1], pivotUpper)) : pivotUpper
trailPivotDown := close[1] < nz(trailPivotDown[1], pivotLower) ? math.min(pivotLower, nz(trailPivotDown[1], pivotLower)) : pivotLower
pivotTrend := close > nz(trailPivotDown[1]) ? 1 : close < nz(trailPivotUp[1]) ? -1 : nz(pivotTrend[1], 1)
pivotSuperTrend = pivotTrend == 1 ? trailPivotUp : trailPivotDown
// === CLASSIC SUPER TREND LOGIC ===
atrST = useClassicATR ? ta.atr(classicATRPeriod) : ta.sma(ta.tr(true), classicATRPeriod)
stUpper = stSource - classicATRMult * atrST
stLower = stSource + classicATRMult * atrST
stUpper1 = nz(stUpper[1], stUpper)
stLower1 = nz(stLower[1], stLower)
stUpper := close[1] > stUpper1 ? math.max(stUpper, stUpper1) : stUpper
stLower := close[1] < stLower1 ? math.min(stLower, stLower1) : stLower
var int stTrend = 1
stTrend := close > stLower1 ? 1 : close < stUpper1 ? -1 : stTrend
classicSuperTrend = stTrend == 1 ? stUpper : stLower
// === ENTRY CONDITIONS ===
buySignal = pivotTrend == 1 and stTrend == 1 and pivotTrend[1] == -1
sellSignal = pivotTrend == -1 and stTrend == -1 and pivotTrend[1] == 1
// === ATR-BASED SL/TP ===
atrSLTP = ta.atr(14)
longSL = close - slATRMult * atrSLTP
longTP = close + tpATRMult * atrSLTP
shortSL = close + slATRMult * atrSLTP
shortTP = close - tpATRMult * atrSLTP
// === STRATEGY ORDERS ===
if (buySignal and strategy.position_size <= 0)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", from_entry="Long", stop=longSL, limit=longTP)
if (sellSignal and strategy.position_size >= 0)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", from_entry="Short", stop=shortSL, limit=shortTP)
// === VISUALS ===
plot(pivotSuperTrend, title="Pivot SuperTrend", color=pivotTrend == 1 ? color.lime : color.red, linewidth=2)
plot(classicSuperTrend, title="Classic SuperTrend", color=stTrend == 1 ? color.green : color.maroon, linewidth=2, style=plot.style_linebr)
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", textcolor=color.white, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", textcolor=color.white, size=size.small)
// === ALERTS ===
alertcondition(buySignal, title="Buy Alert", message="🔥 DILL Strategy Buy Signal")
alertcondition(sellSignal, title="Sell Alert", message="🔥 DILL Strategy Sell Signal")