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.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
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:
- Smoothing. A larger N averages more candles, so single spikes have less effect and the line is smoother.
- Lag. The average is built from past data, so it trails price. A larger N means more lag. The SMA is a lagging indicator. See leading vs lagging indicators.
A drawn example (no real prices)
- Before A: price rises in steps. The SMA rises more slowly beneath it.
- Between A and B: the trend is steady. Price pulls back towards the SMA and moves away again. Some traders call this dynamic support.
- Around C: price turns down. The SMA keeps rising for a while because it still averages the older, higher closes. It only flattens and turns later. This delay is the lag in practice.
How to add the SMA in MT4 and MT5
The steps are almost the same in MetaTrader 4 and MetaTrader 5:
- Open the chart of the instrument you want.
- Go to Insert → Indicators → Trend → Moving Average. You can also drag "Moving Average" from the Navigator window onto the chart.
- In the settings window, set MA method to Simple.
- Set Period to your chosen N.
- Set Apply to to Close. Open, high, low, median and typical price are also available.
- Shift moves the line forward or back by a number of bars. Leave it at zero unless you have a reason to change it.
- 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:
- Slope. A rising line means recent closes are higher than earlier ones in the window. A falling line means the opposite. A flat line means no clear direction. See market trends.
- Price position. Closes holding above the line describe strength over that window. Closes holding below describe weakness.
- Distance. A large gap between price and the SMA shows a fast move relative to the average. It does not mean price must come back.
- Fast vs slow SMA. A short-period SMA reacts quickly and a long-period SMA reacts slowly. Their relative position describes short-term versus longer-term direction. Crossings are covered in MA crossover.
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:
- Trend filter. Only consider setups that match the slope of a long-period SMA. Look at the higher timeframe first. See multiple timeframes.
- Pullback reference. Watch how price behaves when it returns to the line in a trend. See pullbacks.
- Base for other tools. Bollinger Bands and MA envelopes are built around an SMA.
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
- Match N to the swing you trade. A short N follows minor swings and produces more noise. A long N describes the broader trend but responds late.
- Timeframe changes meaning. The same N covers very different amounts of time on different timeframes. Think in terms of how much market history the window covers.
- Popular periods act partly through attention. Widely watched averages can see reactions because many participants watch them. That effect is not guaranteed and varies by market.
- Avoid curve-fitting. Testing many periods and keeping the one that looked best in the past usually fails out of sample. Prefer a few round, reasoned choices and test them on unseen data.
Where the SMA misleads
- Ranging markets. In sideways price action the line goes flat and price crosses it repeatedly. Each cross looks meaningful and most are not. Check trend strength with tools such as ADX.
- Drop-off effect. When an unusually large candle leaves the window, the SMA can jump even if current price barely moves. Equal weighting means old data affects the line as strongly as new data.
- Late turns. After sharp reversals the SMA confirms the change late, often after much of the move has happened.
- Gaps and news spikes. A single extreme close distorts the average for the whole length of the window.
- Unfinished candle. On the live bar, the SMA uses the current price as the close, so the last point moves until the bar closes. Completed values do not change. This is different from true repainting indicators.
- Data differences. Feeds and session times differ between providers, so the same SMA can show slightly different values on different platforms.
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.
