How far behind price is an EMA in a steady move: 9, 21 and 50 on a 1.2 pip per bar drift
Posted: Thu Oct 29, 2026 11:26 am
How far behind price is an EMA in a steady move: 9, 21 and 50 on a 1.2 pip per bar drift
An exponential moving average with period n uses the smoothing factor 2 / (n + 1). In a steady ramp, where price rises by the same amount each bar, the EMA settles into a constant lag behind price of (n minus 1) / 2 bars. That's the same lag as a simple average of the same period.
For a drift of 1.2 pips a bar, which is a decent M5 trend, the gaps are:
EMA 9: lags 4 bars, 4.8 pips behind price.
EMA 21: lags 10 bars, 12 pips.
EMA 50: lags 24.5 bars, 29.4 pips.
I checked this with a loop that fed a ramp into the formula for 1,000 bars, and the lag settled at 4.0, 10.0 and 24.5 bars.
Where this helps is in setting the distance between price and the EMA that means something. If price is 5 pips above EMA 9 in a ramp of 1.2 pips a bar, that's not stretched: it's what a steady trend looks like. A pullback entry that waits for price to touch the EMA 21 in the same trend needs price to fall back 12 pips, which is 10 bars of drift, so the pullback has to erase ten bars of progress.
So the distance to an EMA is a measure of trend speed. Divide the pip gap by the lag in bars and you recover the drift per bar. A gap of 12 pips to the EMA 21 means about 1.2 pips a bar.
An exponential moving average with period n uses the smoothing factor 2 / (n + 1). In a steady ramp, where price rises by the same amount each bar, the EMA settles into a constant lag behind price of (n minus 1) / 2 bars. That's the same lag as a simple average of the same period.
For a drift of 1.2 pips a bar, which is a decent M5 trend, the gaps are:
EMA 9: lags 4 bars, 4.8 pips behind price.
EMA 21: lags 10 bars, 12 pips.
EMA 50: lags 24.5 bars, 29.4 pips.
I checked this with a loop that fed a ramp into the formula for 1,000 bars, and the lag settled at 4.0, 10.0 and 24.5 bars.
Where this helps is in setting the distance between price and the EMA that means something. If price is 5 pips above EMA 9 in a ramp of 1.2 pips a bar, that's not stretched: it's what a steady trend looks like. A pullback entry that waits for price to touch the EMA 21 in the same trend needs price to fall back 12 pips, which is 10 bars of drift, so the pullback has to erase ten bars of progress.
So the distance to an EMA is a measure of trend speed. Divide the pip gap by the lag in bars and you recover the drift per bar. A gap of 12 pips to the EMA 21 means about 1.2 pips a bar.