OPEN-SOURCE SCRIPT

Kira EMA9 EMA21 VWAP ZONES

13
//version=5
indicator("Kira EMA9 EMA21 VWAP ZONES", overlay=true)

// === EMAs ===
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

// === VWAP ===
vwapLine = ta.vwap(hlc3)

// === CONDITIONS ===
isBuy = ema9 > ema21 and close > vwapLine
isSell = ema9 < ema21 and close < vwapLine
noTrade = not isBuy and not isSell

// === PLOTS ===
plot(ema9, color=color.green, linewidth=2)
plot(ema21, color=color.red, linewidth=2)
plot(vwapLine, color=color.blue, linewidth=2)

// === BACKGROUND ZONES ===
bgcolor(isBuy ? color.new(color.green, 85) :
isSell ? color.new(color.red, 85) :
color.new(color.gray, 85))

// === BUY / SELL ARROWS EVERY BAR ===
plotshape(isBuy, title="BUY", style=shape.triangleup,
location=location.belowbar,
color=color.green, size=size.tiny)

plotshape(isSell, title="SELL", style=shape.triangledown,
location=location.abovebar,
color=color.red, size=size.tiny)

// === ALERTS ===
alertcondition(isBuy, title="BUY ZONE ACTIVE",
message="BUY zone active on {{ticker}}")

alertcondition(isSell, title="SELL ZONE ACTIVE",
message="SELL zone active on {{ticker}}")

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.