OPEN-SOURCE SCRIPT
150 EMA Crossover with Confirmation Candle

//version=5
indicator("150 EMA Crossover with Confirmation Candle", overlay=true)
// Define EMAs
ema9 = ta.ema(close, 9)
ema150 = ta.ema(close, 150)
// Conditions
bullishCandle = close > open
bearishCandle = close < open
emaCrossUp = ta.crossover(ema9, ema150)
emaCrossDown = ta.crossunder(ema9, ema150)
// Buy Signal
buySignal = emaCrossUp and bullishCandle and close >= ema9
// Sell Signal
sellSignal = emaCrossDown and bearishCandle and close <= ema9
// Plot EMAs
plot(ema9, color=color.orange, title="EMA 9")
plot(ema150, color=color.blue, title="EMA 150")
// Plot signals
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
indicator("150 EMA Crossover with Confirmation Candle", overlay=true)
// Define EMAs
ema9 = ta.ema(close, 9)
ema150 = ta.ema(close, 150)
// Conditions
bullishCandle = close > open
bearishCandle = close < open
emaCrossUp = ta.crossover(ema9, ema150)
emaCrossDown = ta.crossunder(ema9, ema150)
// Buy Signal
buySignal = emaCrossUp and bullishCandle and close >= ema9
// Sell Signal
sellSignal = emaCrossDown and bearishCandle and close <= ema9
// Plot EMAs
plot(ema9, color=color.orange, title="EMA 9")
plot(ema150, color=color.blue, title="EMA 150")
// Plot signals
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
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.