CFDs and forex are complex instruments and come with a high risk of losing money rapidly due to leverage. Risk disclosure

Simple Moving Average (SMA) Explained

This guide covers the formula, settings, platform steps, common uses and failure modes of the simple moving average.

Extrade Pakistan editorial team ·

On this page
  1. What is SMA?
  2. The SMA formula
  3. A drawn example (no real prices)
  4. How to add the SMA in MT4 and MT5
  5. How to read the SMA
  6. Typical uses in an SMA strategy
  7. Choosing the period: notes for experienced traders
  8. Where the SMA misleads
  9. Frequent questions

What is SMA?

A simple moving average (SMA) is a line on the chart that shows the average closing price over a fixed number of recent candles. That number is called the period, written as N.

Each new candle adds the newest close to the calculation and drops the oldest. The line therefore "moves" along with the chart.

Beginners can think of it this way. Price zigzags, and the SMA draws a calmer line through the zigzag. It does not predict anything. It summarises what price has already done.

SMA 20SMA 50
Simple moving average (SMA) on a generated price series, computed with the standard formula. The longer the period, the smoother and slower the line. Illustrative example: made-up numbers for learning, not real prices or a broker's conditions.

The SMA formula

SMA = (sum of the last N closing prices) ÷ N

Every close in the window has equal weight. A close from the start of the window counts exactly as much as the latest one. This is the main difference from the EMA indicator and the WMA indicator, which give more weight to recent prices.

Two properties follow from the formula:

A drawn example (no real prices)

How to add the SMA in MT4 and MT5

The steps are almost the same in MetaTrader 4 and MetaTrader 5:

  1. Open the chart of the instrument you want.
  2. Go to Insert → Indicators → Trend → Moving Average. You can also drag "Moving Average" from the Navigator window onto the chart.
  3. In the settings window, set MA method to Simple.
  4. Set Period to your chosen N.
  5. Set Apply to to Close. Open, high, low, median and typical price are also available.
  6. Shift moves the line forward or back by a number of bars. Leave it at zero unless you have a reason to change it.
  7. Choose the colour and line style, then confirm.

The platform fills in a default period. Check it and change it to the value you want, because defaults are not tuned to any market. You can add several moving averages with different periods to the same chart.

To practise without risking money, use a demo account.

How to read the SMA

These are descriptive readings, not signals:

Typical uses in an SMA strategy

Traders who build an SMA strategy usually use the line as a filter or context tool, not as a trigger on its own. Common uses:

Whatever the use, define your entry, exit and stop in advance and size positions with risk management. Leveraged forex and CFD trading can lose money fast, and no moving average setting removes that risk.

Choosing the period: notes for experienced traders

Where the SMA misleads

For the wider context, see technical analysis.

Frequent questions

What is SMA in trading?

It is the average of the closing prices over the last N candles, drawn as a line that updates with each new candle.

Which SMA period should I use?

No period works for every market. Choose N to match the swings and timeframe you trade, then test it on a demo account and on unseen data.

Is SMA better than EMA?

Neither is better in general. The SMA weights all closes equally and is smoother but slower. The EMA reacts faster to recent prices and responds more to noise.

Does the SMA repaint?

Completed bars keep their values. Only the value on the current, unfinished bar changes until that bar closes.

Can an SMA strategy guarantee profit?

No. The SMA describes past prices, misleads in ranges and after sharp reversals, and leveraged trading can lose money quickly.

Related pages