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}}")
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。