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

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.