What is SMA (Simple Moving Average)?
Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy
The SMA is the oldest and simplest trend tool. Because every close in the window counts equally, it is smooth but slow. On NSE daily charts the 20-day (about a month of sessions), 50-day and 200-day SMAs are the most watched, with the 200-day often used as a dividing line between long-term uptrends and downtrends.
How the SMA is calculated
| Day | Close | Closes in the 5-day window | 5-day SMA |
|---|---|---|---|
| 5 | ₹1,530 | 1,500 · 1,520 · 1,510 · 1,540 · 1,530 | ₹1,520 |
| 6 | ₹1,560 | 1,520 · 1,510 · 1,540 · 1,530 · 1,560 | ₹1,532 |
On day 6 the SMA rose ₹12. Half the story is the new ₹1,560 close; the other half is the ₹1,500 close dropping out. This drop-off effect means an SMA can turn even when today’s price does little, simply because a big move from n days ago leaves the window.
The average age of the data in an n-period SMA is (n − 1) ÷ 2 bars, which is a useful way to think about its lag. A 200-day SMA reflects prices from, on average, about five months ago, given roughly 250 trading sessions a year.
Worked example: Nifty and its 200-day SMA (illustrative)
Nifty closes at 25,300 with its 200-day SMA at 24,200. The distance is 1,100 ÷ 24,200 = 4.5% above the average. A trader using the 200-day as a regime filter only takes long swing setups while Nifty is above it. A mean-reversion trader may also log the distance: when price is unusually far from a short SMA such as the 20-day, pullbacks toward it are common, but how far is "unusual" has to come from that instrument’s own history.
How traders use SMAs and log them
- Trend filter: longs only above a rising 50- or 200-day SMA, shorts only below a falling one.
- Crossovers: the 50-day crossing above the 200-day is called a golden cross, and below it a death cross. Both lag the turn by weeks.
- Pullback entries: in an uptrend, buying near a rising 20-day SMA with the stop below the recent swing low.
- Journal: tag whether price was above or below the SMA at entry, the SMA period, its slope and the distance in percent. Compare expectancy above and below after 30 or more trades.
SMA vs EMA
SMA
EMA
Reference guide
| Context | Value | Reading |
|---|---|---|
| One SMA period chosen per setup and kept | Testable | Results can be compared over time because the line means the same thing |
| Switching between 20, 21, 34 and 50 to find the line price "respected" | Hindsight | Some average always fits past bounces; it tells you nothing about the next one |
| Using SMA crossovers in a sideways market | Whipsaw | Lines cross back and forth and each signal costs charges and slippage |
Questions
How is a simple moving average calculated?
Add the last n closing prices and divide by n. Each new bar adds the latest close and drops the oldest one, so five closes summing to ₹7,600 give a 5-day SMA of ₹1,520.
Which SMA is best for Nifty?
There is no best period. The 20-, 50- and 200-day SMAs are the most watched on daily charts, and many traders use the 200-day as a long-term trend filter.
What is the difference between SMA and EMA?
An SMA weights every close equally, while an EMA gives more weight to recent closes. The EMA turns sooner; the SMA is smoother and lags more.
What does it mean when price is above the 200-day SMA?
Price is above its average of roughly the last 10 months of sessions, which many traders read as a long-term uptrend. It describes the past and does not predict the next move.