
This is a trend-following trading strategy that combines multiple technical indicators including SuperTrend, VWAP, EMA, and ADX. The strategy primarily identifies trend direction through the SuperTrend indicator, confirms trends using the relationship between VWAP and EMA, and filters weak trends using the ADX indicator to provide high-accuracy trading signals. The strategy is designed for intraday trading, particularly on 5-minute, 15-minute, and 1-hour timeframes.
The core logic is based on the following key components: 1. SuperTrend indicator calculation uses a 10-period ATR and 3.0 multiplier to determine trend direction. An uptrend (green) forms when price breaks above the upper band, and a downtrend (red) forms when price breaks below the lower band. 2. 21-period EMA serves as dynamic support/resistance and works with VWAP to confirm trends. Bullish bias exists when VWAP is above EMA; bearish bias when below. 3. ADX indicator measures trend strength - above 25 indicates strong trend and more reliable signals; below 25 indicates weak trend, requiring caution. 4. Entry conditions include: Buy Signal: SuperTrend turns green (uptrend confirmation), closing price above VWAP and EMA, ADX shows trend strength. Sell Signal: SuperTrend turns red (downtrend confirmation), closing price below VWAP and EMA, ADX confirms downtrend strength.
This is a well-structured trend-following strategy with clear logic. The combination of multiple indicators effectively improves trading signal reliability. The strategy’s strengths lie in its clear signals, ease of execution, and good scalability. However, careful attention must be paid to market environment selection and risk control in practical application. Through continuous optimization and improvement, this strategy has the potential to achieve stable returns in strongly trending markets.
/*backtest
start: 2024-02-10 00:00:00
end: 2025-02-08 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("SuperTrend on Steroids", overlay=true)
// Input parameters
atrLength = input(10, title="ATR Period")
atrMultiplier = input(3.0, title="ATR Multiplier")
emaLength = input(21, title="EMA Length")
adxLength = input(14, title="ADX Length")
adxSmoothing = input(14, title="ADX Smoothing")
// EMA Calculation
emaValue = ta.ema(close, emaLength)
// VWAP Calculation
vwapValue = ta.vwap(close)
// ATR Calculation
atrValue = ta.atr(atrLength)
// SuperTrend Calculation
var trend = 1
up = hl2 - atrMultiplier * atrValue
dn = hl2 + atrMultiplier * atrValue
up1 = nz(up[1], up)
dn1 = nz(dn[1], dn)
up := close[1] > up1 ? math.max(up, up1) : up
dn := close[1] < dn1 ? math.min(dn, dn1) : dn
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
// ADX Calculation
[diplus, diminus, adx] = ta.dmi(adxLength, adxSmoothing)
// Buy/Sell Signals
buySignal = trend == 1 and trend[1] == -1
sellSignal = trend == -1 and trend[1] == 1
// Executing Trades
if buySignal
strategy.entry("Long", strategy.long)
if sellSignal
strategy.close("Long")
// Plotting SuperTrend Line
upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_line, color=color.yellow, linewidth=2)
dnPlot = plot(trend == -1 ? dn : na, title="Down Trend", style=plot.style_line, color=color.red, linewidth=2)
// Buy/Sell Labels
plotshape(buySignal, title="Buy Signal", text="BUY", location=location.belowbar, style=shape.labelup, size=size.normal, color=color.green, textcolor=color.white, offset=-1)
plotshape(sellSignal, title="Sell Signal", text="SELL", location=location.abovebar, style=shape.labeldown, size=size.normal, color=color.red, textcolor=color.white, offset=1)
// Background Highlighting
fill(upPlot, dnPlot, color=trend == 1 ? color.new(color.green, 90) : color.new(color.red, 90), title="Trend Highlight")
//vwap and EMA
plot(emaValue, title="EMA", color=color.white, linewidth=2)
plot(vwapValue, title="VWAP", color=color.blue, linewidth=2)