Weighted Moving Average (WMA) for Indian Markets
Learn WMA with a worked 5-day Nifty calculation, a real 9 vs 21 WMA crossover, and the options trade result in rupees with STT and tax.
Key Takeaways
- 1.A Weighted Moving Average (WMA) multiplies each price by a weight, sums them, then divides by the sum of weights. For a 5-period WMA the divisor is 15 (5+4+3+2+1).
- 2.Worked example below: a 5-day WMA of Nifty closes (24,180 to 24,520) comes out to about 24,402, well above the 5-day SMA of 24,356, which is why WMA reacts faster.
- 3.WMA crossovers fire earlier than SMA crossovers. We show a real-style Nifty 9-WMA versus 21-WMA crossover and the resulting Nifty options trade in rupees, including STT and brokerage.
- 4.On Indian F&O, trading WMA signals is taxed as business income at your slab, not as capital gains. STCG on equity delivery is 20% and LTCG is 12.5% above Rs 1.25 lakh.
- 5.WMA is a lagging trend filter, not a crystal ball. It whipsaws in sideways Nifty ranges, so confirm with RSI, volume or price structure before risking capital. All numbers here are illustrative.
What a Weighted Moving Average Actually Is
A Weighted Moving Average (WMA) is a trend line that gives the newest prices the loudest voice. A Simple Moving Average (SMA) treats a price from 9 days ago exactly the same as today's price. A WMA refuses to do that. It multiplies the most recent close by the highest weight and the oldest close by the lowest weight, so the line hugs current price action more tightly and turns sooner when momentum shifts.
This matters in Indian markets because indices like Nifty 50 and Bank Nifty can move 1 to 2 percent in a single session around events such as RBI policy, the Union Budget or quarterly results. A slow SMA can leave you holding a losing options position while the trend has already rolled over. A WMA, by leaning on recent closes, flags that change a day or two earlier. That earlier signal is the whole reason traders accept the extra noise that comes with it.
The trade-off is simple to state. Faster signals mean more signals, and more signals mean more false starts in a choppy market. So a WMA is best treated as a trend filter and timing aid, never as a standalone buy or sell machine. The sections below show you the exact maths, a full Nifty crossover, and the rupee outcome of trading it.
The WMA Formula, Step by Step
For an N-period WMA, the newest price gets weight N, the next gets N minus 1, and so on down to the oldest price which gets weight 1. You multiply each price by its weight, add up all those products, then divide by the sum of the weights. The sum of weights for N periods is N times N plus 1, divided by 2. For a 5-period WMA that sum is 15. For a 9-period WMA it is 45. For a 21-period WMA it is 231.
- Step 1: List the last N closing prices, newest first.
- Step 2: Assign weights from N down to 1, with N going to the newest close.
- Step 3: Multiply each close by its weight to get a weighted price.
- Step 4: Add all weighted prices together.
- Step 5: Divide that total by the sum of weights (15 for a 5-period WMA).
That last division is the part the old version of this page left out. A weights table is useless until you finish the division and get a number you can plot. Let us do exactly that with real Nifty closes next.
Worked Example: 5-Day WMA on Nifty 50
Take five recent daily closes for Nifty 50. These levels are illustrative but sit in a realistic 2024 to 2025 range. We list them oldest to newest, then apply weights 1 through 5 with the heaviest weight on the newest close.
| Day | Nifty Close | Weight | Close x Weight |
|---|---|---|---|
| Day 1 (oldest) | 24,180 | 1 | 24,180 |
| Day 2 | 24,260 | 2 | 48,520 |
| Day 3 | 24,310 | 3 | 72,930 |
| Day 4 | 24,440 | 4 | 97,760 |
| Day 5 (newest) | 24,520 | 5 | 122,600 |
| Total | 15 (weights) | 365,990 (sum) |
Now finish the maths. The sum of the weighted prices is 365,990. Divide by the sum of weights, which is 15. That gives a 5-day WMA of 24,399.3, roughly 24,400. Compare that with the plain 5-day SMA, which is just the five closes added (121,710) divided by 5, equal to 24,342.
The WMA (about 24,400) is roughly 58 points above the SMA (24,342) because price has been rising and the newest, higher closes carry more weight. In an uptrend the WMA leads the SMA. In a downtrend it sits below the SMA. That gap is the early-warning value you are paying for.
With Nifty trading near 24,520 and the 5-day WMA at about 24,400, price is comfortably above its short WMA, which is a simple bullish read. The moment a daily close prints back below roughly 24,400, the short-term up-bias is in question. That single number, not the weights table, is what you act on.
A Real Nifty WMA Crossover Signal
Most traders do not watch price versus one WMA. They watch a fast WMA cross a slow WMA. A common pair on the Nifty daily chart is the 9-period WMA against the 21-period WMA. When the 9-WMA crosses above the 21-WMA, momentum has turned up. When it crosses below, momentum has turned down.
Here is an illustrative but realistic sequence. For three sessions the 9-WMA and 21-WMA values track each other, then the faster line punches through. The crossover candle closes around Nifty 24,450.
| Session | 9-WMA | 21-WMA | Signal |
|---|---|---|---|
| T minus 2 | 24,290 | 24,330 | 9-WMA below 21-WMA (bearish bias) |
| T minus 1 | 24,360 | 24,345 | Lines converging |
| T (cross) | 24,455 | 24,360 | 9-WMA crosses ABOVE 21-WMA (bullish) |
| T plus 1 | 24,560 | 24,390 | Trend confirmed, both rising |
On session T the 9-WMA (24,455) crosses above the 21-WMA (24,360). That is your bullish trigger. A faster SMA cross on the same data would typically have fired one session later, near 24,560, costing you about 100 Nifty points of entry. That earlier entry is exactly why momentum traders prefer the WMA for crossover timing.
Trading That Crossover With Nifty Options, in Rupees
A spot signal only matters once you turn it into a position. Say the bullish 9 over 21 WMA cross prints with Nifty near 24,450, and you express the view by buying one lot of a slightly out-of-the-money weekly call. The Nifty lot size is 65. Assume you buy the 24,500 call (weekly expiry) at a premium of Rs 110.
- Entry: Buy 1 lot 24,500 CE at Rs 110. Cost = 110 x 65 = Rs 7,150.
- Two sessions later Nifty pushes to about 24,650 as the WMA trend holds. The 24,500 CE is now worth roughly Rs 185.
- Exit: Sell 1 lot at Rs 185. Proceeds = 185 x 65 = Rs 12,025.
- Gross profit = 12,025 minus 7,150 = Rs 4,875 before costs.
Now subtract real costs so the number is honest. STT on options is charged at 0.15 percent of premium on the sell side for both squared-off and exercised positions as of the current rate, which on Rs 13,875 is about Rs 14. A discount broker charges a flat fee around Rs 20 per order, so Rs 40 for entry and exit. Add exchange transaction charges, GST at 18 percent on brokerage and STT-exempt charges, SEBI fees and stamp duty, and total round-trip costs land near Rs 90 to Rs 120.
| Item | Amount (Rs) |
|---|---|
| Gross profit | 5,625 |
| STT (0.15% of sell premium) | 21 |
| Brokerage (Rs 20 x 2) | 40 |
| Exchange, GST, SEBI, stamp (approx) | 55 |
| Net profit (illustrative) | about 5,509 |
This Rs 5,509 from Nifty options is treated as business income from F&O, not capital gains. It is added to your other income and taxed at your slab rate. You cannot apply the 20 percent STCG or 12.5 percent LTCG equity rates to F&O profits. Keep a trade log because F&O turnover and audit rules under the Income Tax Act can apply.
The point of the example is not the exact rupee figure, which will vary with volatility and premiums. The point is that a WMA crossover is only worth trading once it survives costs and your tax slab. A signal that earns Rs 200 gross but costs Rs 120 round trip and is then taxed at 30 percent is not a strategy. Size and instrument choice decide whether a good signal becomes a good trade.
WMA vs SMA vs EMA: Which to Use When
Three moving averages dominate Indian charting platforms. The SMA weights every price equally. The WMA weights prices in a straight line, newest heaviest. The EMA (Exponential Moving Average) also favours recent prices but decays older prices smoothly using a multiplier rather than a fixed ladder. EMA reacts a touch faster than WMA in most settings, while WMA is slightly smoother than EMA for the same period.
| Feature | SMA | WMA | EMA |
|---|---|---|---|
| Weighting | Equal | Linear, newest heaviest | Exponential decay |
| Reaction speed | Slowest | Fast | Fastest |
| Whipsaws in range | Fewest | More | Most |
| Best use | Long-term trend, 200-day | Short to medium momentum | Intraday and scalping |
| Typical Nifty setting | 50, 200 | 9, 21 | 9, 20, 21 |
A practical rule for Indian traders: use a 200-day SMA to judge the broad market regime on Nifty, use a 9 and 21 WMA or EMA pair for swing entries, and drop to a 5 or 9 EMA for intraday Bank Nifty scalps. WMA sits in the middle, faster than SMA, smoother than EMA, which is why it is a comfortable default for positional and swing traders who hate excessive noise.
Choosing WMA Periods for Indian Instruments
Period choice should match your holding time, not a generic preset. Shorter WMAs catch turns fast but generate more false signals, which is expensive in options where time decay punishes indecision. Longer WMAs are calmer but lag, which is fine for delivery investing where you are not paying premium decay every day.
- Bank Nifty intraday (high volatility): 5 and 13 WMA on 5-minute or 15-minute charts.
- Nifty swing trading (a few days to two weeks): 9 and 21 WMA on the daily chart.
- Large-cap delivery such as Reliance, TCS or HDFC Bank: 20 and 50 WMA on the daily chart.
- Long-term positional or SIP-style stock investing: 100 or 200 WMA to define the primary trend.
Bank Nifty deserves special care. With a lot size of 30 and large point swings, a single premium move can be several thousand rupees per lot, so a faster 5 and 13 WMA pair often suits its volatility better than the calmer 9 and 21 used on Nifty. Always backtest your chosen pair on at least a year of data for that specific instrument before committing real capital.
Using WMA for Stop-Loss and Risk Management
Beyond entries, the WMA doubles as a dynamic, trailing stop-loss. In a confirmed Nifty uptrend, many swing traders trail their stop a little below the rising 21-WMA. As the WMA climbs, the stop climbs with it, locking in gains without forcing you to guess a fixed exit level. The moment price closes decisively below the WMA, the trend assumption is broken and you exit.
Pair this with hard position sizing. A widely used rule is to risk no more than 1 to 2 percent of capital per trade. On a Rs 5,00,000 account, that is Rs 5,000 to Rs 10,000 of risk. If a Nifty option trade based on a WMA cross would lose more than that when your WMA stop is hit, the position is too large and you cut the lot count. The indicator finds the trade, but sizing keeps you in the game.
Indian indices often spike intraday and reverse, so place WMA-based stops on a closing basis (end of candle below the WMA) rather than on a single tick touch. This filters out the fake breakdowns that are common around 9:15 am open volatility and around major news.
Where WMA Fails: Honest Limitations
The biggest weakness is whipsaw in range-bound markets. When Nifty chops sideways in a 300-point band for two weeks, the 9-WMA and 21-WMA cross back and forth repeatedly. Each cross looks like a signal, but most are noise. In options, paying premium and round-trip costs on five failed crosses can quietly drain an account even when no single loss looks dramatic.
WMA is also a lagging indicator. It is built from past prices, so it confirms a move that has already begun rather than predicting one. It will never get you in at the exact bottom or out at the exact top. Around gap-up or gap-down events, such as a surprise RBI decision or global selloff, price can leap straight past the WMA and the signal arrives only after a large move has happened.
- Whipsaws in sideways ranges create repeated false crossovers.
- It lags, confirming trends after they start, never predicting them.
- Gaps can blow past the WMA, making the signal late and the entry poor.
- On illiquid stocks, thin volume distorts closes and therefore the WMA itself.
Confirming WMA Signals With Other Tools
Because WMA crossovers misfire in chop, treat them as one input, not the verdict. Combine the WMA trend read with a momentum oscillator and with volume. A 9 over 21 WMA bullish cross is far more trustworthy when the RSI is above 50 and rising, and when the cross candle prints on above-average volume. If RSI is flat near 50 and volume is thin, the cross is probably noise inside a range.
- RSI: a bullish WMA cross with RSI above 50 confirms real momentum.
- Volume: a cross on heavy volume is stronger than one on light volume.
- Price structure: only trust upside crosses above clear support, not into resistance.
- Higher timeframe: align the daily WMA trend with the weekly trend before sizing up.
For a deeper toolkit, explore the other guides in our technical indicators library and bolt momentum and volume filters onto your WMA system. The combination, not the WMA alone, is what gives an edge in Indian markets.
Sources and Further Reading
For authoritative data and contract rules, refer to Zerodha Varsity, Investopedia, NSE India and NSE Indices (Nifty Indices). Lot sizes, STT rates and tax rules change, so always confirm current contract specifications and rates on the official source before you trade. All price levels and rupee figures here are illustrative and are not a recommendation or a promise of returns.
Sources and Further Reading
For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia, NSE India and NSE Indices (Nifty Indices). Always confirm current rules, rates and contract specifications on the official source before you trade.
Related Topics
Related Articles
Understanding the Qstick Indicator for Indian Markets
Learn the Qstick indicator with a worked Reliance example, best Nifty and Bank Nifty settings, a costed options trade and Indian tax rules.
Support Resistance Level Calculator
Free support and resistance calculator with Pivot Points, Fibonacci levels, psychological levels, confluence zones, and signals for Nifty and stocks.
Williams %R: Trading Guide for India (2026)
Master Williams %R indicator for Indian stock trading. Learn overbought/oversold signals, divergence, failure swings, and Nifty trading examples.
Understanding the T3 Moving Average in Indian Markets
Explore the T3 Moving Average for NSE and BSE trading.
Understanding Standard Pivot Points in Indian Markets
Learn how to use Standard Pivot Points in Indian trading.
Understanding the Linear Regression Indicator in Indian Markets
Learn the Linear Regression Indicator with a real Nifty worked example: slope value, futures lot size 75, and rupee profit after STT and charges.
The trading journal for stocks, options, forex, futures & crypto. Track your trades, spot patterns, build discipline.
- Log one trade a day by hand, on purpose
- AI mentor finds your repeat mistakes
- Behavioural analytics catch tilt early
- Trading calendar with P&L heatmap
- Pre-trade checklist flags risks
Free to start · No broker credentials