OPEN-SOURCE SCRIPT

My script

17
// version=5 indicator("Custom LuxAlgo-Style Levels", overlay=true, max_lines_count=500)

// --- Trend Detection (EMA Based) fastEMA = ta.ema(close, 9) slowEMA = ta.ema(close, 21) trendUp = fastEMA > slowEMA trendDown = fastEMA < slowEMA

plot(fastEMA, title="Fast EMA", color=color.new(color.blue, 0)) plot(slowEMA, title="Slow EMA", color=color.new(color.orange, 0))

// --- Buy / Sell Signals buySignal = trendUp and ta.crossover(fastEMA, slowEMA) sellSignal = trendDown and ta.crossunder(fastEMA, slowEMA)

plotshape(buySignal, title="Buy", style=shape.labelup, color=color.new(color.green,0), size=size.small, text="BUY") plotshape(sellSignal, title="Sell", style=shape.labeldown, color=color.new(color.red,0), size=size.small, text="SELL")

// --- Auto Support & Resistance length = 20 sup = ta.lowest(length) res = ta.highest(length)

plot(sup, title="Support", color=color.new(color.green,70), linewidth=2) plot(res, title="Resistance", color=color.new(color.red,70), linewidth=2)

// --- Market Structure (Simple Swing High/Low) sh = ta.highest(high, 5) == high sl = ta.lowest(low, 5) == low

plotshape(sh, title="Swing High", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny) plotshape(sl, title="Swing Low", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.tiny)

// --- Alerts alertcondition(buySignal, "Buy Signal", "Trend Buy Signal Detected") alertcondition(sellSignal, "Sell Signal", "Trend Sell Signal Detected")

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.