WhitmanTrading

Exponential Moving Average: Not Faster

An exponential moving average weights recent closes more heavily than old ones, with the weight decaying geometrically rather than cutting off. At the standard multiplier its centre of mass matches a simple average of the same period exactly, so it is differently distributed rather than genuinely faster.

How it works

A candlestick chart of the site's shared price history. The headline on the chart reads: Weight that decays instead of stopping.
Weight that decays instead of stopping. Illustrative chart - not real market data.

A simple moving average puts equal weight on N bars and zero weight on everything older. An exponential moving average puts the most weight on the newest bar and reduces the weight on each older bar by a constant factor, forever.

A gently rising stretch of the long price series. The headline on the chart reads: The multiplier is two over the period plus one.
The multiplier is two over the period plus one. Illustrative chart - not real market data.

The formula is one line. Today’s value equals today’s close times a multiplier, plus yesterday’s average times one minus that multiplier. The multiplier is conventionally 2 divided by the period plus one — for a 20-period average, 2/21, or about 0.095.

So today’s close accounts for roughly 9.5% of a 20-period exponential average, yesterday’s for about 8.6%, and so on down a geometric curve that never quite reaches zero.

The claim that does not survive the arithmetic

A calmly advancing stretch of the long price series. The headline on the chart reads: Same centre of mass as the simple one: nine and a half bars.
Same centre of mass as the simple one: nine and a half bars. Illustrative chart - not real market data.

The exponential average is sold as the faster one. Check the centre of mass and that gets more complicated. For a simple average of period N the average age of the data is (N−1)/2 — 9.5 bars at N=20. For an exponential average with multiplier a, the average age is (1−a)/a. Put a = 2/21 in and you get 9.5 bars.

They are identical, and not by coincidence. The 2/(N+1) convention exists precisely because it makes the two averages equivalent in average data age, so that a 20-period exponential average is comparable to a 20-period simple one. The convention encodes the equivalence.

A strongly rising stretch of the long price series. The headline on the chart reads: It moves sooner on the new bar, not sooner overall.
It moves sooner on the new bar, not sooner overall. Illustrative chart - not real market data.

What is true is that it reacts sooner to a single new bar. 9.5% of one new close moves the line immediately, whereas a simple average gives that close 5% and simultaneously drops an old bar. So on the bar a move begins, the exponential line does move first.

What is false is that this makes it less lagging in general. The weight it takes off the recent past has to go somewhere, and it goes into a long tail of old bars it never discards. Sooner on the new bar, later on the tail, same average age.

A flat but volatile stretch of the long price series. The headline on the chart reads: The two lines sit thirty-eight percent of a bar apart.
The two lines sit thirty-eight percent of a bar apart. Illustrative chart - not real market data.

Measured on this site’s shared history, a 20-period simple and a 20-period exponential average sat an average of 38% of a median bar’s range apart, and 126% apart at the widest point. In other words, most of the time the two lines are inside a single bar of each other. The choice between them is a much smaller decision than the amount written about it suggests.

The tail that never ends

A flat, quiet stretch of the long price series. The headline on the chart reads: It never fully forgets a bar it has seen.
It never fully forgets a bar it has seen. Illustrative chart - not real market data.

Because the weight decays but never hits zero, every bar the average has ever seen is still in it. A close from 500 bars ago contributes an amount too small to see, and it contributes.

A 72-bar candlestick section of the shared price history. The headline on the chart reads: Two platforms seeded differently give different values.
Two platforms seeded differently give different values. Illustrative chart - not real market data.

Which creates a practical problem nobody warns beginners about: the line has to be started somewhere. Some platforms seed the first value with a simple average of the first N bars, some with the first close, some with a longer warm-up. Two charts of the same instrument with the same setting can therefore show slightly different values, and the difference shrinks with history but never fully disappears.

If a backtest and a live chart disagree slightly on an exponential average, this is usually why. It is not a bug and it is not worth chasing; it is worth knowing so you do not chase it.

In practice: where it actually matters

A long-horizon candlestick view of the same price series. The headline on the chart reads: On a long horizon the difference disappears entirely.
On a long horizon the difference disappears entirely. Illustrative chart - not real market data.

On long periods the two are visually indistinguishable. A 200-period simple and a 200-period exponential average track each other so closely that the choice is aesthetic. Anyone arguing about which to use for a long-horizon trend read is arguing about nothing measurable.

On short periods the difference is real but small, and it shows up as timing rather than direction. The exponential line turns a bar earlier and gives back a bar earlier too.

The place it genuinely matters is inside other indicators. The moving average convergence divergence indicator, MACD, is built from exponential averages, and so are most oscillator smoothings. When you change the smoothing type on an indicator you are changing this, and the effect compounds through the calculation.

A candlestick chart with a volume histogram beneath it, with the volume histogram emphasised. The headline on the chart reads: It weights by age, never by participation.
It weights by age, never by participation. Illustrative chart - not real market data.

It weights by age and nothing else. A heavy bar and a dead one get the same treatment if they are the same distance back. Weighting by volume is a different tool entirely.

A candlestick series containing several opening gaps, with the largest opening gap marked. The headline on the chart reads: A gap is one enormous new bar, weighted heavily.
A gap is one enormous new bar, weighted heavily. Illustrative chart - not real market data.

A gap hits the heaviest weight in the calculation, because the gap arrives on the newest bar, which is the one with the largest multiplier. Exponential averages therefore jump more on gaps than simple ones do.

A declining stretch of the long price series, with the entry price and the level at which a stop would trigger drawn as horizontal lines. The headline on the chart reads: And a faster line means an earlier stop, not a better one.
And a faster line means an earlier stop, not a better one. Illustrative chart - not real market data.

Using it as a trailing stop exits sooner. Sooner is not better or worse on its own — it takes you out of reversals earlier and out of ordinary pullbacks earlier too, and which of those dominates depends entirely on the market you are in.

A candlestick chart of the site's shared price history, annotated with the round-trip cost. The headline on the chart reads: The extra signals each cost a share of a bar.
The extra signals each cost a share of a bar. Illustrative chart - not real market data.

And a faster line produces more signals, each costing 2% of a typical bar’s range in round-trip costs on this history. That cost is the concrete price of the extra responsiveness, and it is payable whether the responsiveness helped or not.

What an exponential average is not

It is not lag-free. Its average data age is the same as the simple average of the same period. Any material selling it as the fix for lag has not done the arithmetic.

It is not a different measurement. Both lines are summaries of the same closes. They cannot disagree about anything except emphasis.

It is not a reason to abandon the simple version. The 200-period simple average is the one with the self-fulfilling audience behind it, and swapping it for an exponential one gives up that effect for no measurable gain.

And it is not more sophisticated. It is one multiplication and one addition per bar — computationally cheaper than a simple average, which is why it became standard in the first place, back when that mattered.

When it fails

A sideways, range-bound candlestick series. The headline on the chart reads: In a range the faster line is simply wrong sooner.
In a range the faster line is simply wrong sooner. Illustrative chart - not real market data.

In a range the added responsiveness is a liability. Price oscillates, the faster line follows each oscillation further, and every turn produces a signal that the next turn cancels. Being early to a move that reverses is worse than being late to it.

The second failure is switching type after a losing run. Simple to exponential is a change of roughly 38% of a bar’s range in where the line sits. It cannot be the reason a strategy stopped working, and treating it as the fix wastes the review that would have found the real cause.

A third is comparing values across platforms. Different seeding produces different numbers, so an alert set on one platform’s exponential value can fire at a slightly different price on another.

A fourth is stacking it with a simple average of the same period and calling it two signals. They have the same centre of mass. That is one signal drawn twice, and the confluence page covers why this is the most common way people manufacture false confidence.

And a fifth is assuming the standard multiplier is fixed. Some platforms allow a custom smoothing factor, and changing it breaks the equivalence to a simple average of the stated period entirely — the label still says 20 while the line behaves like something else.

The original data

Measured across the 576 bars of this site’s shared history, the 20-period simple and exponential averages differed by an average of 38% of a median bar’s range, with a maximum divergence of 126%. The figures are stored in research/series-measurements.json and computed by site/measure_series.py, so both are checkable rather than asserted.

A 72-bar window of the shared price history, cut short at the decision bar. The headline on the chart reads: The fast line crossed, the slow one has not. Act?
The fast line crossed, the slow one has not. Act? Illustrative chart - not real market data.

The useful takeaway is a ratio, not a preference. The two lines are usually within one bar of each other, and the centre-of-mass arithmetic says they carry data of identical average age. So the honest version of the “simple or exponential” question is: this choice moves the line by less than one bar, and the period you pick moves it by half the period. One of those decisions is roughly twenty times larger than the other, and it is not the one most people spend their time on.

Simple moving average is the equal-weight version and the direct comparison. Moving average is the parent page for the whole family. And MACD is the indicator built entirely from exponential averages, which is where this arithmetic actually shows up in something people trade.

What I actually do

I switched everything to exponential averages years ago because a video told me they were faster, and I could not have explained what faster meant if you had asked me. Working out the centre of mass was the moment the whole family of indicators stopped feeling like magic and started feeling like arithmetic I could check.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.