How does it work?
For a close-based three-bar SMA, add the three closes and divide by three. As a new bar completes, the oldest close leaves the window and the new close enters. A longer window changes more slowly and can obscure shorter movement.
Specify the source. A close-based average differs from one based on the midpoint or a derived price. A 20-bar average on a five-minute chart also covers a different horizon from a 20-bar daily average.
Crosses between price and an average, or between two averages, are candidate observations. They need explicit entry, exit, and cost assumptions before they become testable rules. Repeated crosses in a range can produce many losing signals.

Calculate a rolling mean
Fictional closes of 10, 12, and 11 produce an SMA of 11. If the next close is 13, the window becomes 12, 11, and 13, giving an SMA of 12.
A common mistake to avoid
Treating a smoothed historical line as a guaranteed support level or a forecast.
Make it practical
Put the idea into practice.
Use a demonstration, fictional record or paper environment. These optional checkpoints help you work through simple moving average (sma).
Check your understanding.
Explain the idea in your own words, apply it to a fresh example, then name a limitation before checking below.
A useful check
- An SMA gives equal weight to the observations in its window.
- Its meaning depends on source and timeframe.
Watch for this mistake: Treating a smoothed historical line as a guaranteed support level or a forecast.
If your explanation depends on the example working out favorably, try another outcome and check the reasoning again.
Key takeaways
- An SMA gives equal weight to the observations in its window.
- Its meaning depends on source and timeframe.
Sources and further reading
Original provider, exchange, regulator, and platform material supports checking definitions and current details.
- Technical indicatorsTradingView
- Exponential moving averageTradingView