//@version=5
indicator("9 EMA Crosses 21 EMA Buy Signal", overlay=true)
// Calculate EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
// Plot EMAs
plot(ema9, color=color.blue, title="9 EMA")
plot(ema21, color=color.red, title="21 EMA")
// Buy signal condition
buySignal = ta.crossover(ema9, ema21)
// Plot Buy Signal
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
No comments:
Post a Comment