This is because the wrong “zero lag” formula is being used…
The “zero lag” formula in use is only intended for simple moving averages, as the average is approximately in the middle of the “window”…
The window is equal to the period (N).
Zerolag = Round((N-1)/2)
When applied to an exponential moving average, the average is no longer in the middle of the “window.” This is because in an EMA, emphasis is placed on recent prices, causing the average to shift forward, and so the zero lag formula is no longer accurate…