If the fast EMA is above the slow EMA it show price difference as a positive price, but when the fast EMA is bellow the slow ema its a negative price.
I know its because the formula is Fast - Slow EMAs so I was looking for a formula that just shows the difference between the two. If anyone can help, Thanks.
[/CODE]
I know its because the formula is Fast - Slow EMAs so I was looking for a formula that just shows the difference between the two. If anyone can help, Thanks.
Code:
input price = close;
input superfastLength = 9;
input fastLength = 20;
input slowLength = 50;
input averageType = AverageType.EXPONENTIAL;
input showlabel = yes;
plot SupFastMA = MovingAverage(averageType, price, superfastLength);
plot FastMA = MovingAverage(averageType, price, fastLength);
plot SlowMA = MovingAverage(averageType, price, slowLength);
SupFastMA.SetDefaultColor(GetColor(1));
FastMA.SetDefaultColor(GetColor(1));
SlowMA.SetDefaultColor(GetColor(2));
AddCloud(FastMA, SlowMA, Color.GREEN, Color.RED);
AddCloud(SupFastMA, FastMA, Color.LighT_GREEN, Color.Light_RED);
def Between = FastMA - SlowMA;
AddLabel (showlabel, "Between " + Between, Color.CYAN);
# End Code
[/CODE]