Our journal app is in pre-release. If you notice a problem, please contact us.

Home › Articles › SMA vs EMA: what is the difference?

Article

SMA vs EMA: what is the difference?

When you add a moving average, you have to pick a type: SMA or EMA. Even with the same 20 periods, the lines look a little different and turn at different times. This article shows how each is calculated and what that changes, with charts and simple math. It does not tell you which one to use.

Published 13 Oct 2026By Kenji Okumura, Representative, Tiltnote (has traded forex)

In short

An SMA (simple moving average) averages the last N closes with equal weight. An EMA (exponential moving average) gives newer prices more weight and older ones less. So with the same period, an EMA tends to react to recent moves sooner.

How an SMA is calculated

An N-period SMA adds up the latest N closes, including the current bar, and divides by N.[1] In a 20-period SMA, each of the 20 closes gets 1 ÷ 20 = 5% of the weight. Anything older than that gets no weight at all.

How an EMA is calculated

An EMA takes the previous EMA and mixes in a little of the current close.[1]

EMA now = close now × α + previous EMA × (1 − α)
α = 2 ÷ (N + 1)

α = 2 ÷ (N + 1) is the common choice (the MT5 help page gives the formula but not how α is set). For a 20-period EMA, α = 2 ÷ 21, about 9.5%. The current close gets about 9.5%, the bar before about 8.6%, the one before that about 7.8%, and so on, a little less each time. The weight never quite reaches zero, so prices older than 20 bars still count a little (by our calculation, all closes before the latest 20 together carry about 13.5%).

Bar chart: a 20-period SMA gives each of the last 20 closes 5% and nothing before that. A 20-period EMA gives the current bar about 9.5%, and older bars less and less.
How much weight each past close gets. The SMA (dashed line) gives 5% to each of the last 20 bars and 0 after that. The EMA (bars) gives the newest the most and older ones less.

The rough lag is about the same

When price rises in a straight line, an N-period SMA and an EMA with α = 2 ÷ (N + 1) both lag by about (N − 1) ÷ 2 bars (see the math in why indicators lag). An EMA is not lag-free.

The differences show up when price changes direction and when one bar moves a lot.

At a turn, the EMA tends to turn first

Because an EMA weights new prices more, it tends to turn sooner than an SMA when price turns. In the made-up price path below, the EMA turned down 7 bars after price turned, and the SMA 10 bars after.

A price path that rises and turns, with a 20-period SMA and a 20-period EMA. The EMA turns down 7 bars after price turns, the SMA 10 bars after.
A made-up example. The EMA (solid line) turns down after 7 bars and the SMA (dashed line) after 10. The exact numbers depend on the shape of the move.

Turning sooner is not only a plus. The EMA also reacts more to small ups and downs, so in sideways markets it can flip direction more often (the same issue as false signals, or whipsaws, in golden and death crosses).

After one spike bar, an SMA moves twice

An SMA has a behavior an EMA does not. One big spike bar pushes the SMA when it enters the average, and moves the line again N bars later, when that price drops out. The SMA moves even if price is doing nothing at that moment.

In an EMA, the spike's weight fades a little each bar, so the line returns slowly and smoothly.

A flat price path with one big spike bar. The SMA rises at the spike and drops again 20 bars later, when that price leaves the average. The EMA rises at the spike and then returns slowly.
A made-up example (zoomed in vertically, with the top of the spike cut off). The SMA (dashed line) drops 20 bars after the spike, even though price is almost flat.

When an SMA suddenly changes direction, the line alone cannot tell you whether that came from the current move or from an old price dropping out. Checking for a big bar N bars back makes it easier to tell.

Other types in MT5

Most charting platforms offer SMA and EMA, though names and options vary. Here is MT5 as an example. Besides SMA and EMA, the MT5 moving average also offers the smoothed moving average (SMMA) and the linear weighted moving average (LWMA).[1] Like an EMA, an LWMA gives newer prices more weight, but the weight falls by a fixed step and nothing older than N bars is included.

Which to use (you decide)

Which works better depends on the market, timeframe and how you use it, so this article does not pick one. What we can say is how they behave:

If you use one, put the type and period in your strategy name, like "SMA 20" or "EMA 20", so you can compare later how each worked for you. The trading stats calculator turns a P&L list into win rate, average P&L and longest losing streak. With few trades, the numbers can swing a lot.

Sources

  1. MetaQuotes. Moving Average (MetaTrader 5 Help). https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma

Tools for this article

Log which moving average you used.

Tiltnote is a trading journal you can use free with manual entries. On every trade you can log your strategy name, how you felt and whether you kept your rules. Put "SMA 20" or "EMA 20" in the strategy name, and you can look back at how each went.

Try Tiltnote free →Opens the Tiltnote web app. On the free plan, analysis and history show your most recent 14 days (older records are kept and unlock on the paid plan).

More articles

Why indicators lag, and what that means in sudden movesGolden cross and death cross, explainedMACD explained: the math, the zero line and the signal lineBollinger Bands explained: the math, and a common mythIchimoku explained: the five lines, and why the cloud is drawn aheadWhy a backtest can show an edge that isn't thereArticles →

Feedback on this page

Anything missing, unclear, or a tool you would like? Tell us in any language.

Numbers you entered in a tool are not sent. Please do not include account numbers or passwords. Privacy details

This article is general information. It is not investment advice or a recommendation to make any trade.

Updated 20 Oct 2026 · Run by Kenji Okumura, Representative, Tiltnote · About this site