PROTECTED SOURCE SCRIPT
Golden Candle Combined

//version=5
indicator("Golden Candle Combined", overlay=true)
// Calculate EMA9
ema9 = ta.ema(close, 9)
// Previous candle EMA touch condition
prevTouchedEMA = (low[1] <= ema9[1]) and (high[1] >= ema9[1])
// Bullish Golden Candle Conditions
goldenCond1 = low > ema9
goldenCond2 = close > high[1]
goldenCandleBull = goldenCond1 and goldenCond2 and prevTouchedEMA
// Bearish Golden Candle Conditions
sellCond1 = high < ema9
sellCond2 = close < low[1]
goldenCandleBear = sellCond1 and sellCond2 and prevTouchedEMA
// Plot EMA9
plot(ema9, color=color.orange, title="EMA9")
// Plot Bullish Golden Candle
plotshape(goldenCandleBull, title="Golden Candle",
location=location.belowbar, color=color.green, style=shape.labelup,
text="Golden Candle")
// Plot Bearish Golden Candle
plotshape(goldenCandleBear, title="Golden Candle",
location=location.abovebar, color=color.red, style=shape.labeldown,
text="Golden Candle")
indicator("Golden Candle Combined", overlay=true)
// Calculate EMA9
ema9 = ta.ema(close, 9)
// Previous candle EMA touch condition
prevTouchedEMA = (low[1] <= ema9[1]) and (high[1] >= ema9[1])
// Bullish Golden Candle Conditions
goldenCond1 = low > ema9
goldenCond2 = close > high[1]
goldenCandleBull = goldenCond1 and goldenCond2 and prevTouchedEMA
// Bearish Golden Candle Conditions
sellCond1 = high < ema9
sellCond2 = close < low[1]
goldenCandleBear = sellCond1 and sellCond2 and prevTouchedEMA
// Plot EMA9
plot(ema9, color=color.orange, title="EMA9")
// Plot Bullish Golden Candle
plotshape(goldenCandleBull, title="Golden Candle",
location=location.belowbar, color=color.green, style=shape.labelup,
text="Golden Candle")
// Plot Bearish Golden Candle
plotshape(goldenCandleBear, title="Golden Candle",
location=location.abovebar, color=color.red, style=shape.labeldown,
text="Golden Candle")
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。