OPEN-SOURCE SCRIPT
Kira EMA9 EMA21 VWAP ZONES

//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}}")
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}}")
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.