JJJJJJ11111
Member
hi guys,
need help on this code.
Something not right, i can't figure it out.
I want a simple and exponential moving average of
5, 9,20,50,100,200
Currently what i did was have a all 5 to200 SMA and EMA plotted out.
I like to translate it to 5 SMA & 5EMA cloud , 9SMA&9EMA CLOUD.
then say 5 SMA and EMA is green color,
cloud will get the same cloud as the SMA&EMA, no matter who is higher. as i checked the color has 2 different color depending on which MA is higher
create 1 formula so i can replicate the rest using edit properties for the other 9,20,50,100,200 EMA and SMA.
thanks in advanced!
Should appear like this, problem is i had to use source code to adjust the color
need help on this code.
Code:
input maAverageType1 = AverageType.EXPONENTIAL;
input maAverageType2 = AverageType.SIMPLE;
input MovAvg = 5;
plot MovAvgExp = MovingAverage(maAverageType2, close, MovAvg);
plot MovAvgSim = MovingAverage(maAverageType1, close, MovAvg);
MovAvgEXP.SetDefaultColor(Color.GREEN);
MovAvgEXP.SetLineWeight(2);
MovAvgEXP.HideBubble();
MovAvgEXP.HideTitle();
AddCloud(MovAvg, MovAvg, (Color.GREEN), (Color.GREEN) , yes);
Something not right, i can't figure it out.
I want a simple and exponential moving average of
5, 9,20,50,100,200
Currently what i did was have a all 5 to200 SMA and EMA plotted out.
I like to translate it to 5 SMA & 5EMA cloud , 9SMA&9EMA CLOUD.
then say 5 SMA and EMA is green color,
cloud will get the same cloud as the SMA&EMA, no matter who is higher. as i checked the color has 2 different color depending on which MA is higher
create 1 formula so i can replicate the rest using edit properties for the other 9,20,50,100,200 EMA and SMA.
thanks in advanced!
Should appear like this, problem is i had to use source code to adjust the color
Last edited: