Technical Analysis

What is SMA (Simple Moving Average)?

Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy

DefinitionA simple moving average (SMA) is the plain average of the last n closing prices, with every close weighted equally, recalculated each bar. Five daily closes of ₹1,500, ₹1,520, ₹1,510, ₹1,540 and ₹1,530 give a 5-day SMA of ₹7,600 ÷ 5 = ₹1,520 (illustrative).
Formula
SMA(n) = (C₁ + C₂ + … + Cₙ) ÷ n; rolling update: SMA today = SMA yesterday + (New close − Dropped close) ÷ n
Example
Illustrative: next close ₹1,560 replaces ₹1,500, so SMA = ₹1,520 + (₹1,560 − ₹1,500) ÷ 5 = ₹1,532

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

DayCloseCloses in the 5-day window5-day SMA
5₹1,5301,500 · 1,520 · 1,510 · 1,540 · 1,530₹1,520
6₹1,5601,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.

Lag of a 20-day SMA
9.5 bars
Lag of a 200-day SMA
99.5 bars
Weight of each close, 20-day
5%

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

Equal weight on every close in the window; older data drops off abruptly. Smoother, slower to turn.
20-day: each close weighted 5%

EMA

Heavier weight on recent closes, decaying for older ones. Turns sooner, but reacts more to single large bars.
20-day multiplier: 2 ÷ 21 = 0.095
Common mistake
Treating the SMA as a price that will hold. A moving average is an average of past closes, not a level where orders sit. Use it as context and place stops from price structure.
For Indian traders
Long SMAs on NSE stocks need split- and bonus-adjusted data: an unadjusted 1:1 bonus halves the price overnight and drags the 200-day SMA for months. Index charts are not affected by corporate actions in the same way.

Reference guide

ContextValueReading
One SMA period chosen per setup and keptTestableResults 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"HindsightSome average always fits past bounces; it tells you nothing about the next one
Using SMA crossovers in a sideways marketWhipsawLines 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.

Related terms