Hello, I have been following the forum for a while and enjoy learning thinkscript. Decided to make a simple multiple moving average indicator based off Raghee's EMA Wave from SimplerTrading. She uses a 34 EMA wave with high, close and low. Instead of having to add each manually everytime, I made it into one indicator. The moving average type and length can be changed. I set the default to 200 EMA. Hope it's helpful!
Code:
input HighAverageLength = 200;
input CloseAverageLength = 200;
input LowAverageLength = 200;
input AverageType = AverageType.Exponential;
def MA1 = MovingAverage(AverageType, high, HighAverageLength);
def MA2 = MovingAverage(AverageType, close, CloseAverageLength);
def MA3 = MovingAverage(AverageType, low, LowAverageLength);
plot HighAverage = MA1;
plot CloseAverage = MA2;
plot LowAverage = MA3;
HighAverage.setDefaultColor(Color.Green);
CloseAverage.setDefaultColor(Color.Blue);
LowAverage.setDefaultColor(Color.Red);
Last edited: