What is Moving Average?
Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy
How it is calculated
A simple moving average (SMA) adds the last N closes and divides by N. When a new bar closes, the oldest one drops out and the new one comes in, which is why the line “moves”. Most platforms use the closing price by default, though the input can be changed.
| Day | Close | 5-day sum | 5-day SMA |
|---|---|---|---|
| 1 | 24,800 | ||
| 2 | 24,900 | ||
| 3 | 25,000 | ||
| 4 | 24,950 | ||
| 5 | 25,100 | 1,24,750 | 24,950 |
| 6 | 25,050 | 1,25,000 (24,800 out, 25,050 in) | 25,000 |
SMA vs EMA
Simple (SMA)
Exponential (EMA)
Every moving average lags price, because it is built from past closes. An SMA’s centre sits (N − 1) ÷ 2 bars back, so a 20-day SMA reflects price from about 9.5 sessions ago and a 200-day SMA from about 100 sessions ago. An EMA of the same period lags less, which is the whole trade-off: less lag means more false turns.
Common periods and what they are used for
| Average | Chart | Typical use |
|---|---|---|
| 9 and 21 EMA | 5- or 15-minute | Intraday trend direction and pullback entries |
| 20 EMA or SMA | Daily | Short swing trend; trailing exits |
| 50 SMA | Daily | Medium-term trend filter |
| 200 SMA | Daily | Long-term trend; the most widely watched line on Nifty and large caps |
| 50 / 200 crossover | Daily | Golden cross (50 above 200) and death cross (50 below 200) |
How traders use it, with a worked trade
Moving averages are used four ways: as a filter (trade only in the direction of the slope), as dynamic support or resistance for pullback entries, as crossover signals, and as a trailing exit. Illustrative swing trade in a large-cap NSE stock trading above a rising 50-day SMA: price pulls back to ₹1,480 while the average is at ₹1,476. A buy at ₹1,488 with a stop at ₹1,458, below the average with a buffer, risks ₹30 a share. With ₹9,000 of risk that is 300 shares.
The exit at ₹1,566 is ₹78 a share above entry, ₹23,400 on 300 shares. In your journal, tag such trades “with MA trend” or “counter-trend” and record which average the entry and exit were based on, so the review can compare expectancy for each bucket after 30 or more trades.
Reference guide
| Context | Value | Reading |
|---|---|---|
| Price above a rising 50-day average, trades taken only long | Clear trend filter | Works while the trend lasts; in a sideways market price crosses the line back and forth |
| Crossover signals used in a range-bound month | Whipsaws | Each cross reverses within days and each one costs a small loss plus charges |
| Period changed after every losing streak | Curve fitting | The settings end up describing the past few weeks, not the setup; fix the period in the plan |
Questions
What is the best moving average for intraday trading?
There is no single best one. 9 and 21-period EMAs on 5- or 15-minute charts are common, often alongside session VWAP. Pick one set, write it in the plan, and judge it on your own logged trades.
What is the difference between SMA and EMA?
An SMA weights every close in the window equally. An EMA gives more weight to recent closes, so it turns sooner but also produces more false signals.
What is the 200-day moving average?
The average of the last 200 daily closes. It is widely used as a long-term trend line: price above a rising 200-day average is read as a long-term uptrend.
How do you calculate a moving average?
For an SMA, add the last N closes and divide by N. For an EMA, use EMA = Close × k + previous EMA × (1 − k), with k = 2 ÷ (N + 1).
What is a golden cross?
When the 50-day moving average crosses above the 200-day. The opposite, the 50 crossing below the 200, is called a death cross. Both lag price by weeks.