The Weighted Moving Average (WMA) is one of three core moving-average flavours every Indian-index trader should understand — alongside SMA (Simple) and EMA (Exponential). Where SMA gives every bar in the lookback equal weight, and EMA gives recent bars exponentially decaying influence, WMA does something in between: it uses a linear weight schedule that puts the most weight on the most recent close and steps down by 1 for each older bar.
This linearity gives WMA a distinct character. It reacts slightly faster than EMA at the latest bar, but it has a sharper “edge” — the oldest bar in the window completely drops out the moment it leaves, rather than fading exponentially. This guide explains what WMA is, how to compute it, and when to choose it over SMA or EMA for trading NIFTY 50 and BANK NIFTY.
For a closing-price series P over a window of n bars, the Weighted Moving Average is defined as:
WMA = (n × P_t + (n−1) × P_t−1 + (n−2) × P_t−2 + ... + 1 × P_t−(n−1))
÷
(n + (n−1) + (n−2) + ... + 1)
The denominator — the sum of weights — has a closed-form expression: n × (n + 1) / 2. For a 10-period WMA, the weight sum is 10 × 11 / 2 = 55. The most recent bar contributes 10/55 ≈ 18.2%, the next bar contributes 9/55 ≈ 16.4%, the third 8/55 ≈ 14.5%, and so on down to the oldest at 1/55 ≈ 1.8%.
Compare this to a 10-period SMA where every bar contributes exactly 10%, or a 10-period EMA where the most recent bar weighs ~18% and the influence of older bars decays geometrically without a sharp cut-off.
A worked example — 5-period WMA on NIFTY 50
Suppose the last 5 NIFTY 50 daily closes are:
The numerator: (5 × 24,400) + (4 × 24,200) + (3 × 24,250) + (2 × 24,100) + (1 × 24,000) = 122,000 + 96,800 + 72,750 + 48,200 + 24,000 = 363,750.
The denominator: 5 + 4 + 3 + 2 + 1 = 15.
The 5-period WMA = 363,750 / 15 = 24,250.
Compare to a 5-period SMA over the same five closes: (24,000 + 24,100 + 24,250 + 24,200 + 24,400) / 5 = 24,190. The WMA, at 24,250, is closer to the most recent close (24,400) because the weighting pulls it toward recent strength. SMA, at 24,190, lags more.
What WMA is good at
Catching the leading edge of a trend. Because the most recent bar contributes nearly 1/5 of the average in a 10-period WMA, a strong move on the latest bar moves the WMA noticeably more than it moves the equivalent SMA. Traders who want to enter trends early often prefer WMA over SMA for this reason.
Crossover signals with modest noise. WMA crossovers (e.g., 9-WMA crossing 21-WMA) flip slightly earlier than the equivalent EMA crossovers without dramatically increasing the false-signal rate. On daily NIFTY charts, the 9/21 WMA crossover historically flips a few days before the 9/21 EMA crossover at trend changes.
Smooth-but-responsive trend filters. A 50-period WMA on the daily chart sits between a 50-EMA (smoother) and a 50-SMA (smoother still) in terms of responsiveness. For traders who feel EMA reacts too quickly to short-term noise but SMA lags too much, WMA is a sensible middle ground.
What WMA is bad at
Sharp drop-off at the lookback edge. Because the oldest bar in the window has weight 1 and the bar just outside has weight 0, a single old extreme bar can cause the WMA to “jump” the moment it falls off the back of the window. This produces small artefacts on the line that EMA, which fades older bars exponentially, does not have.
Single-bar volatility. On a 5-minute NIFTY chart, a single 50-point bar at the latest close moves the WMA proportionally more than it moves an equivalent SMA. In choppy markets this can amplify noise.
Less smoothing than SMA at long lookbacks. A 200-period WMA is somewhat smoother than a 50-WMA but never quite as smooth as a 200-SMA. For very long-term trend definition, SMA still wins.
WMA vs SMA vs EMA — which one to pick
A practical decision tree:
- If you want the smoothest possible line on a long lookback (50, 100, 200): use SMA.
- If you want modest smoothing with no abrupt edge: use EMA.
- If you want earliest reaction to the most recent bar without the math of EMA: use WMA.
- If you want the most responsive while still smoother than fast SMA: use HMA (which is built on WMA — see our Hull Moving Average guide).
For Indian-index trend definition on the daily timeframe, the practical performance difference between 50-EMA, 50-WMA, and 50-SMA is small — usually 1 to 3 bars of timing difference at trend turns. The choice matters more on intraday charts where each bar is shorter and the front-of-window weighting has bigger impact.
For a head-to-head comparison of EMA and SMA specifically on NIFTY 50, see our EMA vs SMA page which publishes the average lag in trading days, total cross counts, and forward 1-day and 30-day returns for each.
Common WMA periods on Indian indices
These are the conventions:
- 9-WMA / 21-WMA on 5-min and 15-min for intraday momentum
- 20-WMA / 50-WMA on 1-hour for swing-trade bias
- 50-WMA / 200-WMA on daily for long-term primary trend
The same fast/slow logic from EMA applies: slow above fast = bullish; slow below fast = bearish; the slope tells you trend strength; a fresh crossover is the trigger.
Settings considerations
For a single WMA used as a trend filter, longer is smoother but slower. The conventional pairings — 9/21 intraday, 20/50 hourly, 50/200 daily — exist because they balance signal frequency against false-signal rate. Pushing the lookback shorter (e.g., 5/13) generates more signals but most of the extra signals are noise. Pushing it longer (e.g., 100/300) suppresses noise but you’ll be late to trend changes.
For Indian indices specifically, the daily 50-period and 200-period are the most quoted because they correspond loosely to “the 2-month average” and “the 9-month average” — meaningful chunks of business cycle. WMA at these lookbacks tends to flip 1–3 trading days before SMA at the same length and roughly together with EMA.
A WMA on its own is a single number that says one thing: are recent prices net-up or net-down on this lookback? It tells you nothing about regime, volatility, or alignment across timeframes. For a complete picture before taking a WMA-driven trade:
A WMA crossover on the 15-minute chart, confirmed by 1-hour regime alignment and a low whipsaw count, is a far higher-conviction setup than a WMA crossover taken in isolation.
Bottom line
WMA is a useful middle-ground moving average — faster than SMA, simpler than EMA, with a clean linear weighting that’s easy to understand and easy to implement. For Indian-index daily trend filtering, the 50-WMA is a sensible alternative to the more popular 50-EMA. On intraday charts, 9-WMA and 21-WMA crossovers fire slightly earlier than EMA equivalents. As always, no single moving average is a complete trading system — pair it with regime and alignment filters before risking real capital.
Frequently asked questions
- What is the Weighted Moving Average?
- The Weighted Moving Average (WMA) is a moving average that assigns linearly increasing weights to more recent prices. The most recent close gets the highest weight, the second-most-recent gets the second-highest, and so on, declining to a weight of 1 for the oldest bar in the lookback window.
- What is the formula for WMA?
- WMA = (n × P_t + (n-1) × P_t-1 + (n-2) × P_t-2 + ... + 1 × P_t-(n-1)) / (n + (n-1) + (n-2) + ... + 1). The denominator is the sum of weights, which equals n × (n+1) / 2 for a window of n bars.
- What is the difference between WMA and EMA?
- Both give more weight to recent prices, but they decay differently. WMA uses linear weights — the n-th most recent bar has weight n, decreasing by 1 each bar to the oldest. EMA uses exponentially decaying weights — recent bars matter much more, but older bars never fully drop out. EMA is generally smoother; WMA reacts slightly faster at the very newest bar but has a sharper cut-off at the lookback edge.
- Is WMA better than SMA for trading?
- WMA reacts faster than SMA because recent prices matter more, but it is also more sensitive to a single anomalous bar. For trend-following, WMA gives slightly earlier signals than same-length SMA. For mean-reversion or noise-filtering, SMA is more stable. The right choice depends on whether you are trying to catch turns early or filter out short-term noise.
- What is volume-weighted moving average and how is it different?
- Volume-Weighted Moving Average (VWMA) weights each bar by trading volume rather than time-based linear weights. Bars with high volume influence the average more than bars with low volume. VWMA is most useful on stocks with high-volume earnings days or news bars; it adds little on indices where volume is more uniform.
More in Moving Averages: The Complete Guide for NIFTY & BANKNIFTY Traders
Related on emaindicator.com