OPEN-SOURCE SCRIPT

My script

11
// 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")

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。