Trend
Exponential Moving Average (EMA)
The exponential moving average explained: why it reacts faster than the SMA, how to pick a period and which EMA alerts work.
4 min readUpdated
The exponential moving average is a moving average that cares more about recent prices than old ones. It follows the trend like the SMA but turns sooner when the price changes direction, which is why fast traders prefer it.
What it measures
An EMA keeps one number and nudges it toward every new close:
For N = 20, : each new close pulls the average 9.5 % of the way toward itself. Older closes never fully leave, they fade: a close 20 bars ago still counts with a weight of about 13 % of the newest one.
Because the newest bars dominate, the EMA reacts to a turn several bars before an SMA of the same period.
Try it
Compare with the SMA chart: at the same period, the EMA lines bend sooner after the drop and the recovery.
How Subtrigger computes it
| Crypto | US stocks and ETFs | |
|---|---|---|
| Periods | 20 and 50 | 20 |
| Bar | 1 minute | 5 minutes |
| First value | right away on Binance, after N bars elsewhere | after 20 bars |
| Stream | ind:ema_20_1m@okx.spot:ETHUSDT:value | ind:ema_20_5m@nasdaq.etf:QQQ:value |
The EMA is started from the simple average of its first N bars and then updated bar by bar. Subtrigger keeps four periods of bars (81 bars for EMA 20), long enough for the start to fade out completely.
How to read it
The same way as the SMA, only earlier:
- Slope is the trend.
- Price above / below the EMA is bullish / bearish.
- EMA 20 crossing EMA 50 marks a change of the short-term trend.
- In strong trends the price pulls back to EMA 20 and bounces: a common place to look for entries.
| SMA | EMA | |
|---|---|---|
| Weights | equal | recent bars more |
| Turns | later | sooner |
| False signals in a range | fewer | more |
| Best for | trend filters, levels | timing, fast markets |
Alert ideas
A crypto pair turning up on the short-term trend:
Alert idea
ETHUSDT EMA 20 · 1m · Binance > ETHUSDT EMA 50 · 1m · Binance
An ETF slipping below its fast average:
Alert idea
QQQ Price < QQQ EMA 20 · 5m
Choosing the period
- EMA 20: the short-term trend; the most watched fast average.
- EMA 50: the medium trend and a trend filter.
- The pair 20/50 gives crossovers that are faster than the SMA pair.
For pros
- MACD is the difference of EMA 12 and EMA 26; see MACD.
- Distance in ATR. "Price is 2 ATR above EMA 20" is a portable measure of an overextended move across markets with different prices.
- Seeding. Charting apps seed the EMA from the first candle they have, so their value may differ slightly from Subtrigger's for a few periods. After about four periods both agree within rounding.
Related
- SMA: the equal-weight average.
- MACD: built from two EMAs.
- ATR: to measure how far the price is from its EMA.
FAQ
Is the EMA better than the SMA?
Neither is better. The EMA reacts sooner and gives more signals; the SMA is steadier. Many traders time entries with an EMA and filter the trend with an SMA.
Why does EMA 20 not equal the average of the last 20 closes?
Because it is not an average of 20 closes: every past close contributes with a weight that shrinks the older it gets. The average of the last 20 closes is the SMA.
How long until the EMA is reliable on a cold exchange?
It has a first value after N bars and settles after about 4N bars: for EMA 20 on 1-minute bars, a value after 20 minutes and a fully settled one after about 80.
Keep reading
- TrendSMAThe simple moving average explained: formula, how to read it, crossovers, support levels and ready-made SMA alerts for crypto and stocks.
- TrendMACDMACD line, signal line and histogram explained: crossovers, zero line, divergences and MACD alerts on crypto and stocks.
- VolatilityATRAverage true range explained: true range, Wilder smoothing, stop distances, position sizing and ATR alerts for volatility.