Enhanced ATR-based SuperTrend indicator with multi-timeframe alignment filter, cloud fill, and clean buy/sell arrows.
Copy and paste this code directly into your TradingView Pine Editor
//@version=5
indicator("FxSnip - Multi-Timeframe SuperTrend", "FxSnip SuperTrend", overlay=true)
atrPeriod = input.int(10, "ATR Period")
factor = input.float(3.0, "ATR Multiplier", step=0.1)
[supertrend, direction] = ta.supertrend(factor, atrPeriod)
bodyMiddle = plot((open + close) / 2, display=display.none)
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color=color.green, style=plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color=color.red, style=plot.style_linebr)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps=false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps=false)
plotshape(ta.crossunder(direction, 0), "Buy Signal", shape.triangleup, location.belowbar, color.green, size=size.small)
plotshape(ta.crossover(direction, 0), "Sell Signal", shape.triangledown, location.abovebar, color.red, size=size.small)
.ex5 / .mq5 file.The Multi-Timeframe SuperTrend eliminates false whipsaws by aligning higher timeframe trend direction with lower timeframe entries. Uses ATR volatility tracking with instant signal alerts.
Need this indicator converted into an automated MT5 Expert Advisor or customized for your specific trading rules?
Order Custom Coding →Loading activity...
Just now