1. What Are Moving Averages?
If you have ever looked at a stock chart on Zerodha Kite or any other charting platform, you have probably noticed how chaotic raw price movement can look. A stock like Reliance Industries might swing between ₹2,400 and ₹2,500 in a single week, making it hard to determine whether the broader trend is up, down, or sideways. This is exactly the problem that moving averages solve.
A moving average (MA) is a technical indicator that smooths out price data by creating a constantly updated average price over a specific number of periods. Instead of reacting to every single candle, a moving average condenses the noise into a single flowing line that reveals the direction the market is actually heading.
Think of it this way: if you measured the temperature in Bhopal every hour, the readings would fluctuate wildly between morning and afternoon. But if you calculated the average temperature over the past 7 days, you would get a much clearer picture of whether the weather is getting warmer or cooler. Moving averages do the same thing for stock prices.
There are two primary types of moving averages that every trader on NSE and BSE needs to understand: the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). Both serve the same core purpose of smoothing price data, but they differ fundamentally in how they calculate that average, and this difference has real implications for your trading decisions.
2. SMA: Simple Moving Average Explained
The Simple Moving Average is the most straightforward moving average. It calculates the arithmetic mean of the closing prices over a specified number of periods. Every price point within the lookback period receives equal weight.
How SMA Is Calculated
The formula is simple. For a 10-period SMA, you add up the last 10 closing prices and divide by 10.
SMA = (P1 + P2 + P3 + ... + Pn) / n
Let us take a real example. Suppose the last 5 closing prices of TCS on NSE are: ₹3,520, ₹3,545, ₹3,510, ₹3,560, and ₹3,530. The 5-period SMA would be:
(3520 + 3545 + 3510 + 3560 + 3530) / 5 = ₹3,533
When the next candle closes at, say, ₹3,570, the oldest price (₹3,520) drops off the calculation and the new price takes its place. The SMA "moves" forward with each new candle, hence the name moving average.
Strengths of SMA
- Stability: Because every data point gets equal weight, SMA lines are smoother and less prone to false signals from sudden price spikes.
- Reliability for long-term trends: The 200-day SMA on Nifty 50 is widely followed by FIIs, DIIs, and institutional desks precisely because of its stability.
- Simplicity: Easy to calculate, easy to understand, easy to backtest.
Weaknesses of SMA
- Lag: SMA reacts slowly to price changes. By the time a 50-period SMA turns, a significant portion of the move may already be over.
- Equal weighting problem: A price from 200 days ago has the same influence as yesterday's close. In fast-moving markets like BankNifty, this can be a disadvantage.
3. EMA: Exponential Moving Average Explained
The Exponential Moving Average addresses the SMA's primary weakness by assigning greater weight to the most recent prices. This makes EMA more responsive to new information, which is critical when trading volatile instruments like Nifty options or BankNifty futures.
How EMA Is Calculated
The EMA calculation involves a multiplier (also called the weighting factor or smoothing constant). The formula is:
Multiplier = 2 / (n + 1)
EMA = (Current Price x Multiplier) + (Previous EMA x (1 - Multiplier))
For a 20-period EMA, the multiplier is 2 / (20 + 1) = 0.0952, meaning the most recent closing price receives approximately 9.52% of the total weight. The remaining 90.48% comes from the previous EMA value, which itself was influenced by earlier prices with exponentially decreasing weights.
You do not need to calculate this manually. Every platform from Zerodha Kite to TradingView to Chartink handles it automatically. What matters is understanding the implication: recent prices matter more in EMA than in SMA.
Strengths of EMA
- Responsiveness: EMA turns faster when price direction changes, giving earlier signals than SMA.
- Better for short-term trading: Intraday traders on NSE often prefer the 9 EMA and 21 EMA on 5-minute or 15-minute charts.
- Reduced lag: Because recent data gets more weight, the EMA stays closer to the current price.
Weaknesses of EMA
- More whipsaws: The sensitivity that makes EMA fast also makes it more susceptible to false signals, especially in choppy, sideways markets.
- Complexity: While the calculation is done automatically, understanding why the EMA behaves differently from SMA requires a bit more effort.
In our courses at Market Credo, we teach students to use EMA for entry timing and SMA for trend confirmation. A 9 EMA crossover on a 15-minute BankNifty chart can get you into a trade early, but always check the 50 SMA on the daily chart to make sure you are trading in the direction of the larger trend. This dual-timeframe approach dramatically reduces false signals.
— Atish Shakergaye, SEBI Reg. INH0000060864. Key Periods: 20, 50, 100, and 200
Not all moving averages are created equal. Certain periods have become industry standards because they correspond to natural market cycles and are watched by millions of traders worldwide, including institutional participants on Dalal Street.
20-Period MA (Short-Term Trend)
The 20-period MA roughly corresponds to one month of trading days (NSE has about 22 trading days per month). It tracks the short-term trend and is commonly used by swing traders. When a stock like HDFC Bank pulls back to its 20-day EMA in an uptrend and bounces, that is a classic swing trading entry.
50-Period MA (Medium-Term Trend)
The 50-period MA represents roughly one quarter of trading data. It is the most popular moving average for swing and positional traders. When institutional investors talk about a stock "holding its 50 DMA," they mean the medium-term trend is intact. Mutual fund managers in India frequently reference the 50 DMA when making allocation decisions.
100-Period MA (Intermediate Trend)
The 100-period MA sits between the medium-term and long-term perspectives. While less commonly discussed in financial media, it often acts as a strong dynamic support or resistance level, particularly on weekly charts. Many quantitative trading systems on NSE incorporate the 100 DMA as a secondary filter.
200-Period MA (Long-Term Trend)
The 200-day MA is the gold standard. It is the single most watched moving average in the world, and on Nifty 50 it carries enormous significance. When Nifty trades above its 200 DMA, the long-term trend is considered bullish. When it trades below, the trend is bearish. FIIs routinely use the 200 DMA as a decision-making reference. During the March 2020 crash, Nifty's break below the 200 DMA triggered massive institutional selling. The recovery above it later that year marked the beginning of one of India's strongest bull runs.
5. Golden Cross and Death Cross
Moving average crossovers are among the most powerful trend-change signals in technical analysis. Two crossover patterns stand above all others in significance and reliability.
The Golden Cross
A golden cross occurs when a shorter-term moving average crosses above a longer-term moving average. The classic golden cross is the 50 DMA crossing above the 200 DMA. This signals that the recent trend (50-day) has turned bullish and is now overtaking the long-term trend (200-day), suggesting a potential major uptrend is beginning.
When Nifty 50 formed a golden cross in June 2020 after the COVID crash, it marked the start of a rally from approximately 10,000 to over 18,000 over the following 18 months. Traders who respected this signal and took long positions in quality large-caps like Reliance, Infosys, and HDFC Bank saw extraordinary returns.
The Death Cross
The death cross is the opposite: the 50 DMA crosses below the 200 DMA. This signals that the medium-term trend has deteriorated below the long-term average, suggesting potential for a sustained downtrend. The death cross appeared on Nifty in March 2020 right as the pandemic sell-off intensified, confirming the bearish momentum that was already underway.
Important Caveats
- Golden and death crosses are lagging signals. By the time they form, a significant portion of the move has already occurred.
- They work best in trending markets. In prolonged sideways phases, you will see frequent false crossovers.
- Always confirm crossovers with volume. A golden cross accompanied by rising volumes on NSE is far more reliable than one on declining volumes.
- Use them for directional bias, not exact entry points. Combine with support and resistance levels for precise entries.
6. Moving Averages as Dynamic Support & Resistance
One of the most practical applications of moving averages is using them as dynamic support and resistance levels. Unlike horizontal support and resistance lines that stay fixed at specific price levels, moving averages shift with each new candle, creating moving zones where price tends to react.
In a strong uptrend, price often pulls back to a key moving average and bounces. The 20 EMA acts as the first line of defence for the trend, followed by the 50 SMA, then the 200 SMA. Think of these as floors of support stacked beneath the current price.
Consider Reliance Industries in a strong uptrend. When it pulls back from ₹2,600 to ₹2,520 and finds buying interest right at the 50-day SMA, that moving average is acting as dynamic support. Traders who understand this can use the bounce as a low-risk entry point with a stop-loss just below the moving average.
In a downtrend, the same moving averages act as dynamic resistance. When BankNifty rallies from an oversold condition and stalls right at its falling 20 EMA, short sellers gain confidence that the downtrend is intact.
The key principle is this: the more times price respects a moving average, the stronger that MA becomes as a reference level. If Nifty has bounced off its 200 DMA four times in the past year, the fifth touch will attract enormous buying because every institutional trader is watching it.
7. MAs in Trending vs Ranging Markets
Moving averages are trend-following indicators. This is both their greatest strength and their most significant limitation. Understanding when to use them and when to set them aside is crucial for consistent profitability.
Moving Averages in Trending Markets
In a clear uptrend or downtrend, moving averages perform brilliantly. The MAs fan out in order (20 above 50 above 100 above 200 in an uptrend), price stays above the key MAs, and pullbacks to the MA lines provide excellent entry opportunities. During Nifty's rally from 15,000 to 20,000, the 20 EMA on the weekly chart acted as a reliable support level for over a year.
Moving Averages in Ranging Markets
In sideways, choppy markets, moving averages become liabilities. Price constantly crosses above and below the MAs, generating false buy and sell signals. The moving averages themselves flatten out and start overlapping each other, providing no useful directional information.
If you were trading Nifty in a 22,800-23,400 range, the 20 EMA would constantly whipsaw as price bounced between range boundaries. Every crossover would look like a breakout signal, but most would fail. This is why many experienced traders on Dalal Street switch to oscillators like RSI and mean-reversion strategies during ranging phases.
How to Identify the Market Regime
- Trending: Moving averages are fanned out and sloping in one direction. Price stays consistently on one side of the 50 SMA. ADX above 25.
- Ranging: Moving averages are flat and intertwined. Price crosses the 20 EMA frequently. ADX below 20.
8. Combining MAs with Price Action
Moving averages are most powerful when combined with price action analysis. At Market Credo, we emphasise that no indicator should be used in isolation. Here are proven ways to combine MAs with price action for higher-probability setups on Indian markets.
MA Bounce + Candlestick Pattern
When price pulls back to a key MA and forms a bullish reversal candlestick (like a hammer or bullish engulfing), the confluence of two signals dramatically improves the probability of the trade. For example, if HDFC Bank pulls back to its 50 SMA and forms a bullish engulfing candle on the daily chart, that is a textbook long entry with a stop below the engulfing candle's low.
MA + Support/Resistance Confluence
When a moving average aligns with a horizontal support or resistance level, the zone becomes exceptionally strong. If Nifty's 200 DMA sits at 21,500 and there is also a horizontal support from previous swing lows at the same level, that confluence creates a wall of demand that is very difficult for sellers to break through.
MA + Volume Confirmation
Always look at volume when trading MA signals. A breakout above a declining 200 SMA accompanied by a volume spike of 2-3 times the average daily volume on NSE is far more significant than a breakout on low volume. Volume is the fuel that drives price, and without it, even the best MA signal can fail.
Multiple Timeframe MA Analysis
Use higher timeframe MAs for direction and lower timeframe MAs for entry. If the daily 200 SMA on TCS is sloping upward, look for long entries on the 1-hour chart when price bounces off the 20 EMA. This top-down approach ensures you are always trading with the larger trend.
9. Indian Market Examples: Nifty 200 DMA
The 200-Day Moving Average on Nifty 50 is arguably the most important single indicator for Indian equity markets. Understanding its significance through historical examples will make you a better trader.
March 2020: The COVID Break
Nifty broke below its 200 DMA at approximately 11,600 in early March 2020 and went into freefall, bottoming near 7,500. The break below the 200 DMA was a clear sell signal for positional traders. Those who respected this level and reduced exposure saved their portfolios from a 35% drawdown.
April 2020: The Recovery Signal
When Nifty reclaimed its 200 DMA in early 2021, it was a clear signal that the worst was over. FIIs began aggressively buying Indian equities. The subsequent rally from 14,000 to 18,500 rewarded traders who used the 200 DMA reclaim as a re-entry signal.
2022: Multiple Tests
Throughout 2022, Nifty tested its 200 DMA on several occasions as global interest rates rose. Each successful defence of the 200 DMA attracted fresh buying from DIIs and domestic retail investors, confirming that the long-term bullish structure was intact despite short-term volatility.
Practical Application Today
Every morning before the market opens, check where Nifty's 200 DMA sits. If the index is comfortably above it (say, 5% or more), the long-term trend is strong and you should maintain a bullish bias. If Nifty is approaching or hovering near its 200 DMA, be cautious and reduce position sizes. If it breaks below, shift to a defensive stance. This one simple discipline can protect your capital through the worst market conditions.
Similarly, watch the 200 DMA on individual stocks. When Reliance, TCS, Infosys, or HDFC Bank break above or below their respective 200 DMAs, it carries sectoral implications. A Reliance break below its 200 DMA, for instance, would drag the entire Nifty given its heavy index weighting.
I have been watching the Nifty 200 DMA for over 20 years, and I can tell you this with certainty: every major bull market in India has been characterised by Nifty consistently staying above the 200 DMA, and every major bear market has been characterised by Nifty trading below it. If you learn nothing else from this article, learn to respect the 200 DMA. It is the institutional heartbeat of the Indian market.
— Atish Shakergaye, SEBI Reg. INH000006086Master Moving Averages & Price Action
Learn to combine moving averages with chart structure, candlestick patterns, and support-resistance in our Advanced Technical Analysis course.
Explore Courses <GO>