Exponential average (EMA)
A moving average that gives recent days more weight.
4 min readLesson 40 of 57Interactive
In short
It reacts faster than a simple average of the same length, so it turns sooner, including on false alarms.
Why it matters
A simple moving average treats every day in its window the same. In a 50-day average, yesterday's close counts no more than the close seven weeks ago. That's steady, but slow: when the price turns, the average takes a long time to notice.
The exponential moving average, or EMA, is the most common fix. It gives the newest close the most weight and lets older closes fade away gradually. Many traders prefer it for shorter-term signals, and it's the building block of other popular indicators, such as MACD, which compares a 12-day and a 26-day EMA.
How it works
An EMA is updated one day at a time. Each day, it moves part of the way from yesterday's EMA toward today's close. How far it moves is set by the smoothing factor, which for an N-day EMA is 2 ÷ (N + 1). For a 10-day EMA that's 2 ÷ 11, about 0.18, so the EMA closes about 18% of the gap to the new price each day.
Every past close still counts, but its weight shrinks each day, by a factor of 1 − 0.18 = 0.82 for a 10-day EMA. A close from a month ago has almost no influence. That's why it's called exponential: the weights decay like compound interest in reverse.
An EMA needs somewhere to start. MarketLab, like many charting tools, starts it from the simple average of the first N closes, then applies the update from the next day on. Different tools start it in slightly different ways, so the earliest values can differ a little between sites, but the difference fades as time passes.
Because recent closes dominate, an EMA reacts faster than a simple average of the same length. It turns sooner after a real change in trend, and also sooner after a short blip that quickly reverses.
EMA today = k × today's close + (1 − k) × EMA yesterday, where k = 2 ÷ (N + 1)
Each day, move a fixed share of the way from yesterday's average toward today's price.
A worked example
A stock closed at $50 for ten days in a row, so its 10-day EMA starts at $50. Then it jumps and closes at $55. Compare the new 10-day EMA with the 10-day simple average.
- Smoothing factor for 10 days: k = 2 ÷ (10 + 1) = 2 ÷ 11 ≈ 0.1818.
- New EMA: 0.1818 × $55 + 0.8182 × $50 = $10.00 + $40.91 = $50.91.
- Simple average: the window drops one $50 close and adds $55, so it's (9 × $50 + $55) ÷ 10 = $505 ÷ 10 = $50.50.
- The EMA moved $0.91 toward the new price; the simple average moved $0.50.
Result: After the same jump, the 10-day EMA moved almost twice as far as the 10-day simple average ($50.91 against $50.50). That's the faster reaction, and it would also undo itself faster if the jump reversed.
Try it
Averages and crossovers
Over two years the 20-day and 100-day averages crossed 3 times. The fast one is now above the slow one.
Crossovers
3
Labeled on the chart
Signal now
Uptrend: hold
Warm-up
100 days
Before the slow average exists
Generated prices for illustration, not market data.
How to read it
- Price above a rising EMA
- Recent prices have been trending up. Because the EMA weights recent days, it reflects the latest few weeks more than a simple average would.
- Price below a falling EMA
- Recent prices have been trending down.
- Short EMA crossing a long EMA
- The same idea as a simple-average crossover, but it tends to fire a little earlier, with more false alarms in choppy markets.
- EMA and simple average far apart
- The price has moved a lot recently. The EMA has already moved toward it, while the simple average still holds older prices.
In the real world
- Short-term traders often use EMAs, such as the 9-, 12-, 20- or 26-day, because they respond quickly. Longer-term investors more often quote simple averages like the 200-day, where speed matters less.
- MACD, one of the most popular indicators on charting sites, is built entirely from EMAs: the gap between a 12-day and a 26-day EMA, plus a 9-day EMA of that gap. Wilder's smoothing, used in the RSI, is also a kind of exponential average.
- Faster isn't automatically better. A quicker signal catches turns earlier but also reacts to more noise, which means more trades, more costs and more whipsaws. Testing has not shown EMAs to be reliably more profitable than simple averages; which looks better depends on the stock and the period.
Common mistakes
- Assuming that a faster signal means better returns. It means earlier signals, both right and wrong.
- Comparing an EMA from one site with another and expecting an exact match. Different starting methods can make early values differ slightly.
- Thinking a 10-day EMA only looks at 10 days. Every past close counts a little; the 10 sets how fast old closes fade.
- Switching between EMA and SMA, and between lengths, until a backtest looks great. That's Overfitting, and it rarely holds up on new data.
See it in MarketLab
Test yourself
Optional: 4 quick questions on the words, using the idea, and how it plays out in real markets.
Loading your answers…