looking for a cloud between 10ema and the 22ema
#Written by TOS Indicators 2023
#Home of the Volatility Box
#Indicator: Stacked Moving Averages Indicator
#Full Tutorial Link: tosindicators.com/indicators/stacked-moving-averages
#10 EMA, 22 EMA, 34 EMA, 50 SMA, 200 SMA
plot EMA10 = ExpAverage(close, 10);
EMA10.SetDefaultColor(Color.CYAN);
plot EMA22 = ExpAverage(close, 22);
EMA22.SetDefaultColor(Color.MAGENTA);
plot EMA34 = ExpAverage(close, 34);
EMA34.SetDefaultColor(Color.YELLOW);
plot SMA50 = SimpleMovingAvg(close, 55);
SMA50.SetDefaultColor(Color.YELLOW);
SMA50.SetStyle(Curve.SHORT_DASH);
plot SMA200 = SimpleMovingAvg(close, 200);
SMA200.SetDefaultColor(Color.WHITE);
SMA200.SetStyle(Curve.SHORT_DASH);
def bullStacked = EMA10 > EMA22 and EMA22 > EMA34 and SMA50 > SMA200;
def bearStacked = EMA10 < EMA22 and EMA22 < EMA34 and SMA50 < SMA200;
plot bullStackedPlot = bullStacked and !bullStacked[1];
bullStackedPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullStackedPlot.SetDefaultColor(Color.LIGHT_GREEN);
bullStackedPlot.SetLineWeight(5);
plot bearStackedPlot = bearStacked and !bearStacked[1];
bearStackedPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearStackedPlot.SetDefaultColor(Color.LIGHT_RED);
bearStackedPlot.SetLineWeight(5);
#Written by TOS Indicators 2023
#Home of the Volatility Box
#Indicator: Stacked Moving Averages Indicator
#Full Tutorial Link: tosindicators.com/indicators/stacked-moving-averages
#10 EMA, 22 EMA, 34 EMA, 50 SMA, 200 SMA
plot EMA10 = ExpAverage(close, 10);
EMA10.SetDefaultColor(Color.CYAN);
plot EMA22 = ExpAverage(close, 22);
EMA22.SetDefaultColor(Color.MAGENTA);
plot EMA34 = ExpAverage(close, 34);
EMA34.SetDefaultColor(Color.YELLOW);
plot SMA50 = SimpleMovingAvg(close, 55);
SMA50.SetDefaultColor(Color.YELLOW);
SMA50.SetStyle(Curve.SHORT_DASH);
plot SMA200 = SimpleMovingAvg(close, 200);
SMA200.SetDefaultColor(Color.WHITE);
SMA200.SetStyle(Curve.SHORT_DASH);
def bullStacked = EMA10 > EMA22 and EMA22 > EMA34 and SMA50 > SMA200;
def bearStacked = EMA10 < EMA22 and EMA22 < EMA34 and SMA50 < SMA200;
plot bullStackedPlot = bullStacked and !bullStacked[1];
bullStackedPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullStackedPlot.SetDefaultColor(Color.LIGHT_GREEN);
bullStackedPlot.SetLineWeight(5);
plot bearStackedPlot = bearStacked and !bearStacked[1];
bearStackedPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearStackedPlot.SetDefaultColor(Color.LIGHT_RED);
bearStackedPlot.SetLineWeight(5);
Last edited by a moderator: