In the picture below i've plotted two Moving Averages with same period.
Yellow Line - DEMA (Double Smoothed Exponential Moving Average)
Cyan Dots - ZLEMA (Zerolag Exponential Moving Average)
Yes. it's exactly same.
but the mysterious point is. both have different calculation.
can you explain that how come both have same values despite different calculations?
DEMA
Zerolag EMA
Yellow Line - DEMA (Double Smoothed Exponential Moving Average)
Cyan Dots - ZLEMA (Zerolag Exponential Moving Average)
Yes. it's exactly same.
but the mysterious point is. both have different calculation.
can you explain that how come both have same values despite different calculations?
DEMA
Inserted Code
Inputs: Price(C), Length(20); Vars: X1(0), X2(0), Dema(0); X1= XAverage(Price,Length); X2= XAverage(XAverage(Price,Length),Length); DEMA = X1 * 2 - X2; Plot1(Dema, "DEMA");
Zerolag EMA
Inserted Code
Inputs : Price(C), Length(20); Vars : EMA1(0), EMA2(0), Difference(0), ZeroLagEMA(0); EMA1 = XAverage(Price, Length); EMA2 = XAverage(EMA1, Length); Difference = EMA1 - EMA2; ZeroLagEMA= EMA1 + Difference; Plot1(ZeroLagEMA, "ZerolagEMA");