Skip to content
Menu

Exponential Moving Average (EMA)

By Chad Smith, Director of Research & Analysis · Updated

On this page
  1. What it measures
  2. The formula
  3. Default settings
  4. How to read it
  5. EMA vs SMA and WMA
  6. Common strategies
  7. Weaknesses
  8. Indicators it pairs with
SMA 20EMA 20
Illustration, not real price data

The exponential moving average (EMA) is a moving average that gives the most weight to the latest price and progressively less to older ones. It reacts to new information faster than a simple moving average of the same length, which is why many short-term traders prefer it. It is also the building block of MACD, TRIX and Keltner Channels.

What it measures

The EMA measures the trend-adjusted average price, with recent bars counted more heavily. You can think of it as a running estimate of "fair value" that updates each bar by moving part of the way toward the newest price.

How far it moves is fixed by the smoothing factor. A short EMA moves a large fraction of the way toward each new price, so it follows the market closely. A long EMA moves a small fraction, so it changes slowly and reflects the broader trend.

The formula

α (smoothing factor) = 2 / (N + 1)

EMA(today) = α × P(today) + (1 − α) × EMA(yesterday)

Equivalent form:
EMA(today) = EMA(yesterday) + α × (P(today) − EMA(yesterday))

Seed value:
The first EMA is usually set to the SMA of the first N prices.

where
  P = closing price
  N = number of periods

The second form is the easiest to understand. Each bar, the EMA closes a fixed fraction (α) of the gap between itself and the current price. For a 10-period EMA, α = 2 / 11, about 0.18, so the line closes roughly 18% of the gap every bar. For a 50-period EMA, α = 2 / 51, about 0.04.

Worked example (illustrative numbers). Take a 9-period EMA, so α = 2 / 10 = 0.2. Yesterday's EMA was 100 and today's close is 105. The gap is 5. The EMA moves 0.2 × 5 = 1, so today's EMA is 101. A 9-period SMA in the same situation would move by (105 − the price leaving the window) / 9, which might be more or less depending on that old price. The EMA's change depends only on today's price and yesterday's EMA.

Default settings

Platform defaults vary, but these lengths are standard practice:

PeriodTypical use
9Very short-term timing, often as a signal line
12 and 26The two averages inside MACD
20 or 21Short-term trend and pullback level
50Intermediate trend
200Long-term trend

The EMA is calculated on the close by default and is built into MetaTrader, TradingView and other mainstream platforms.

How to read it

Read the EMA like any moving average: direction, position of price and relationship to other averages. The difference is speed. An EMA will turn up a few bars earlier after a low and turn down earlier after a high.

Because it hugs price, short EMAs are often used as trailing reference lines. In a strong uptrend, price may pull back only to the 9 or 21 EMA before resuming. A close well beyond a short EMA, against the trend, is an early warning that momentum is fading.

Watching how two EMAs separate tells you about pace. When a fast EMA pulls away from a slow EMA, momentum is building. When they converge, it is weakening. That idea is exactly what MACD turns into a separate indicator.

EMA vs SMA and WMA

The EMA, SMA and WMA all average the same prices but weight them differently.

  • SMA: equal weights inside a hard window. Smooth, slow, subject to drop-off jumps when an old extreme price exits.
  • WMA: weights fall in a straight line inside a hard window. Faster than the SMA, but still drops old prices abruptly.
  • EMA: weights fall off geometrically and never quite reach zero. No hard window, so there is no drop-off effect. Responsive but smooth in its transitions.

The Hull moving average goes further than all three in cutting lag, but it can overshoot turning points.

Common strategies

EMA crossover

A fast EMA crossing above a slow EMA signals a possible uptrend; crossing below signals a possible downtrend. Pairs like 9/21 or 12/26 are common. Because EMAs turn sooner, these crossovers appear earlier than SMA crossovers of similar length, with more false starts.

Pullback to a rising EMA

In a trend, traders wait for price to dip into a medium EMA, such as the 20 or 50, then look for a rejection candle like a hammer or a bullish engulfing before entering in the direction of the trend. The stop-loss often goes beyond the recent swing, not just beyond the line.

Multiple-EMA trend stack

Some traders plot three EMAs, for example 8, 21 and 55. When they are stacked in order and sloping the same way, the trend is clear. When the order breaks, the trader stands aside.

Trailing exit

A short EMA can serve as a trailing exit. A position stays open until price closes on the far side of the line.

Weaknesses

Faster means noisier. The EMA reacts to short-lived spikes, so in choppy markets it produces more whipsaw signals than an SMA.

It still lags. Weighting recent prices reduces delay but cannot remove it; the EMA still needs price to move before it turns.

Values depend on history. Because the formula is recursive, the result depends on the seed value and how many bars were loaded. Two platforms can show slightly different EMAs for the same market, especially near the start of the data.

Period choice is arbitrary. There is no objectively correct length, and tuning it to past data can make a method look more reliable than it is.

Indicators it pairs with

  • MACD, which plots the gap between two EMAs and a signal line.
  • ADX, to confirm that a trend exists before trusting EMA crossovers.
  • RSI, to spot divergence when price makes new highs but momentum does not.
  • ATR, to size stops around an EMA-based entry.
  • Keltner Channels, which wrap an EMA with ATR-based bands.

The technical analysis course explains how trend tools like the EMA work alongside price action and chart patterns.

Brokers with strong charting to practice on

Put this into practice on a demo account first, with no money at risk.

Frequently asked questions

Why does the EMA react faster than the SMA?

The EMA applies a smoothing factor that gives the latest price the largest weight and lets older prices fade gradually. A new price therefore moves the line more than it would move an equally weighted average.

What are the most common EMA periods?

Traders often use short EMAs such as 9, 12 or 21 for timing, and longer ones such as 50 or 200 for the bigger trend. MACD is built from 12 and 26 period EMAs.

Does an EMA ever forget old prices completely?

Not in theory. Every past price keeps a small and shrinking weight, unlike an SMA, which drops a price entirely once it leaves the window.

Is the EMA better than the SMA?

It is faster, not better. The EMA spots turns sooner but also gives more false signals in choppy markets, while the SMA is steadier but later.

Why does my EMA value differ between platforms?

An EMA depends on its starting value and on how much history is loaded. Platforms that seed the calculation differently or load less data can show slightly different numbers, especially early in a chart.