SMA indicator: settings and signals
A Simple Moving Average is the arithmetic mean of closing prices over the last N bars, recalculated on every bar.
What the indicator looks like on a real chart
Data: EUR/USD, daily bars, 2025-06-16 — 2026-07-20. The indicator is computed over 400 bars; the chart shows the last 180. Quote source: Binance Spot REST API (api.binance.com/api/v3/klines).
| Regime | Score |
|---|---|
| Trending market | 58 |
| Range | 31 |
| High volatility | 42 |
| Low volatility | 49 |
What the indicator actually measures
SMA is the most straightforward way to separate direction from noise: every bar in the window enters the calculation with equal weight. Hence its main property and main drawback at once — the value changes not only when a new bar arrives but also when an old bar drops out of the window.
This drop-out effect is regularly underestimated. If an anomalously high bar leaves the calculation window, the average will move down even if the current price stands still. An SMA turn in such a situation reflects nothing happening in the market right now — it is an artifact of how the indicator is built.
The amount of lag is predictable: SMA lags by roughly half the period. For SMA(50) that is about 25 bars, and no setting will remove this delay — it follows directly from the definition of an average.
Formula
The sum of N closing prices divided by N. All weights are equal, so a price from ten bars ago influences the result exactly as much as yesterday's.
Standard settings
| Parameter | Value |
|---|---|
| Long-term trend filter | 200 |
| Medium-term trend | 50 |
| Short-term average | 20 |
Periods 50, 100 and 200 are common not because they are optimal but because a large number of participants watch them — at these levels an elevated reaction really is observed. This is a rare case where the popularity of a parameter itself makes it significant.
Implementation code (Python)
def sma(close, period):return close.rolling(period).mean()
When the indicator stops working
- Lag on the order of half the period: on reversals the signal arrives after a substantial move.
- The drop-out effect of an old bar produces moves in the average unrelated to the current market.
- In a ranging market price crosses the average constantly, making any crossover system unprofitable.
Common mistakes in use
- Expecting a price/average crossover to work in a range. All moving averages are trend tools by definition.
- Tuning the period until the signals on history become profitable. The difference between SMA(48) and SMA(52) disappears on new data.
- Treating a "golden cross" of SMA(50) and SMA(200) as a reliable signal. This is a very slow indicator that on daily bars triggers after a significant part of the move.
- Using SMA on an instrument with frequent gaps without accounting for the fact that the discontinuities distort the average for the entire window period.
Who needs this and why
A basic direction tool for medium-term trading. Useful as a filter ("we trade only above SMA(200)") rather than as a source of entry points.
Frequently asked questions
Which is better — SMA or EMA?
They solve different tasks. EMA reacts to recent prices faster and turns earlier, but produces more false signals. SMA is more inert and calmer but lags more. For a long-term direction filter people usually take SMA, for prompt signals EMA.
Why did the average turn while price stands still?
Most likely an anomalous bar left the calculation window. In SMA all bars have equal weight, so the departure of an extreme value changes the average just as much as the arrival of a new one. This is a feature of the construction, not a market signal.
Does the SMA(200) level work as support?
Partly — and for a reason unrelated to mathematics. A great many participants watch this line, so orders concentrate near it and the price reaction becomes self-fulfilling. That said, there is no guarantee the level will hold.