Skip to content
Menu

Simple Moving Average (SMA)

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. SMA vs EMA and other averages
  6. Common strategies
  7. Weaknesses
  8. Indicators it pairs with
SMA 50SMA 20
Illustration, not real price data

The simple moving average (SMA) is the arithmetic mean of the last N closing prices, recalculated on every bar. It is the plainest form of moving average: no weighting, no smoothing constant, just a sum divided by a count. That simplicity makes it easy to check by hand and easy to compare across markets.

What it measures

The SMA measures the average price at which a market has traded over a fixed window. If a 20-period SMA reads 1.1000 on EUR/USD, the mean close over the last 20 bars was 1.1000. Price above that level means the market is currently trading higher than its recent norm. Price below means it is trading lower.

Its slope reflects the direction of the trend. Because every price in the window has equal weight, the SMA represents the whole period evenly. A price from 19 bars ago matters exactly as much as yesterday's. That is both its strength and its main drawback.

The formula

SMA = (P1 + P2 + ... + PN) / N

where
  P1 = the most recent closing price
  PN = the closing price N − 1 periods ago
  N  = the number of periods in the window

Rolling update:
SMA(today) = SMA(yesterday) + (P(today) − P(N periods ago)) / N

The rolling version shows what drives every change in the line. The SMA moves by the difference between the price that just arrived and the price that just left, divided by N. It does not care about the prices in the middle of the window at all when updating.

Worked example (illustrative numbers). A 4-period SMA has these closes in its window: 20, 22, 21 and 25. The SMA is (20 + 22 + 21 + 25) / 4 = 88 / 4 = 22. The next close is 24, and the oldest close of 20 leaves. Using the rolling formula: 22 + (24 − 20) / 4 = 22 + 1 = 23. The average rose by 1 even though the new close of 24 was lower than the previous close of 25. That is the drop-off effect in action: the SMA rose because a low price left the window, not because the market strengthened.

Default settings

Platforms usually open the SMA with a period between 9 and 20, applied to the close. In practice traders use a handful of conventional lengths:

PeriodCommon reading
10 or 20Short-term trend, often on daily or intraday charts
50Medium-term trend on daily charts
200Long-term trend, widely quoted for stocks and indices

The 20-period SMA also sits at the center of Bollinger Bands. The SMA is built into MetaTrader, TradingView and nearly every charting package.

How to read it

Start with direction. A rising SMA says average prices are climbing. A falling SMA says they are dropping. A flat SMA with price wrapping around it suggests a range.

Then compare price to the line. In a healthy uptrend, price spends most of its time above the SMA and pulls back toward it now and then. In a downtrend, the opposite holds. Repeated closes on the other side of the line are a warning that the trend may be changing.

Finally, compare two SMAs. A shorter SMA above a longer one shows recent prices running ahead of the longer-term average. The distance between them gives a rough sense of how stretched the move is.

SMA vs EMA and other averages

The key difference between the SMA and the exponential moving average is weighting. The SMA treats all prices equally. The EMA leans toward recent data, so it reacts earlier to turns and hugs price more closely.

That makes the SMA:

  • Smoother. Single spikes have less effect on its direction, because they are just one of N equal parts.
  • Slower. It takes longer to confirm a new trend.
  • More prone to drop-off jumps. When an extreme price exits, the line can shift abruptly.

The weighted moving average sits between the two in responsiveness, and the Hull moving average is designed specifically to remove most of the lag the SMA carries.

Common strategies

Trend filter

A long-period SMA, often the 200, is used as a filter. Traders favor long positions while price is above it and short positions while price is below it. The SMA does not time the entry; it decides which direction to look for.

Two-SMA crossover

Pair a short SMA with a long SMA. A bullish crossover happens when the short line crosses above the long line; a bearish crossover is the reverse. The 50/200 pairing on daily charts gives the well-known golden cross and death cross. These are confirmation signals for a trend that has already started.

Pullback entries

In an established trend, traders wait for price to return to a medium SMA, such as the 20 or 50, and look for evidence that buyers or sellers are stepping back in. A bullish engulfing candle at a rising SMA is one example of that evidence.

Mean distance

Some traders measure how far price has stretched from its SMA. A very large gap can warn that a move is extended and due for a pause, although strong trends can stay stretched for a long time.

Weaknesses

The SMA lags. Equal weighting means old data holds the line back, so it confirms turns late. In fast markets the signal can arrive after most of the move is over.

It whipsaws in ranges. When price moves sideways, the SMA flattens and price crosses it often, creating a series of failed signals.

It is sensitive to what leaves the window, not only to what enters. A trader can see the SMA rise or fall for reasons unrelated to the current bar, which is confusing if you do not know the cause.

Like every moving average, it carries no information about volatility or volume. A quiet drift and a violent move with the same average look the same.

Indicators it pairs with

  • Bollinger Bands, which add volatility bands around a 20-period SMA.
  • ADX, to judge whether the market is trending enough for SMA signals.
  • RSI or the stochastic oscillator, to time entries during pullbacks to the SMA.
  • Envelopes, which shift copies of an SMA up and down by a fixed percentage.
  • Volume or OBV, to check whether a move through the SMA has participation behind it.

For a wider view of trend tools and how they fit together, see the technical analysis course.

Brokers with strong charting to practice on

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

Frequently asked questions

How is a simple moving average calculated?

Add up the closing prices for the chosen number of periods and divide by that number. Repeat on every new bar, dropping the oldest price and adding the newest.

What is the difference between SMA and EMA?

The SMA weights every price in its window equally, while the EMA gives more weight to recent prices. The EMA therefore turns sooner, and the SMA is smoother and slower.

Why is the 200-day SMA so popular?

It is a long-standing convention for judging the long-term trend of stocks and indices. Because so many people watch it, price reactions around it can become a self-reinforcing habit.

Is the SMA good for day trading?

It can be used on intraday charts with shorter periods. Many short-term traders prefer faster averages, because the SMA's equal weighting makes it slow to respond to sudden moves.

What is the drop-off effect in an SMA?

When an unusually large price leaves the window, the SMA can jump even if the current price did not move much. This happens because every price, old or new, counts equally.