OPEN-SOURCE SCRIPT
Stacked EMA Confirmation

//version=5
indicator(" Stacked EMA Confirmation", overlay=false)
//This script plots a green circle on top of the chart when the EMAs are stacked positively, a red circle if they are stacked negatively and gray if neither positively nor negatively
//The EMAs used are:
//8 EMA
//13 EMA
//21 EMA
//Useful when you look for a quick and easy way to see if these EMAs are stacked positively or negatively as a confirmation
//Default 100 bars back, but that can be adjusted.
StackedLookback = input(100, "How many bars back to show")
ema8 = ta.ema(close, 8)
ema13 = ta.ema(close, 13)
ema21 = ta.ema(close, 21)
conditionMet = ema8 > ema13 and ema13 > ema21
negativeConditionMet = ema8 < ema13 and ema13 < ema21
circleColor = conditionMet ? color.green : negativeConditionMet ? color.red : color.gray
plotshape(series=close, color=circleColor, style=shape.circle, title="Circle", location=location.top, display=display.pane, size=size.auto, show_last=StackedLookback)
indicator(" Stacked EMA Confirmation", overlay=false)
//This script plots a green circle on top of the chart when the EMAs are stacked positively, a red circle if they are stacked negatively and gray if neither positively nor negatively
//The EMAs used are:
//8 EMA
//13 EMA
//21 EMA
//Useful when you look for a quick and easy way to see if these EMAs are stacked positively or negatively as a confirmation
//Default 100 bars back, but that can be adjusted.
StackedLookback = input(100, "How many bars back to show")
ema8 = ta.ema(close, 8)
ema13 = ta.ema(close, 13)
ema21 = ta.ema(close, 21)
conditionMet = ema8 > ema13 and ema13 > ema21
negativeConditionMet = ema8 < ema13 and ema13 < ema21
circleColor = conditionMet ? color.green : negativeConditionMet ? color.red : color.gray
plotshape(series=close, color=circleColor, style=shape.circle, title="Circle", location=location.top, display=display.pane, size=size.auto, show_last=StackedLookback)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。