Hull Moving Average (HMA) for Indian Markets
Hull Moving Average explained for Indian traders: exact formula, a fully worked Reliance example, best Nifty settings, and an options P&L.
Key Takeaways
- 1.The Hull Moving Average (HMA) cuts the lag of a normal moving average by blending three weighted moving averages and taking the square root of the period as the final smoothing length.
- 2.The full formula is HMA(n) = WMA(sqrt(n)) of [ 2 times WMA(n/2) minus WMA(n) ], and this page works it out end to end with real Reliance prices.
- 3.Popular settings on Indian charts are 9 or 21 bars for intraday Nifty and Bank Nifty, and 55 or 89 bars for swing positions on cash stocks.
- 4.HMA is a trend and momentum tool, not a holy grail. It whipsaws in sideways markets, so confirm with volume, structure, or a second indicator.
- 5.All trade numbers below are illustrative. F&O profit is taxed as business income at your slab, and no indicator guarantees returns.
What the Hull Moving Average actually is
The Hull Moving Average (HMA) is a smoothing line built by Australian trader Alan Hull in 2005. A normal simple moving average reacts slowly because every old price still carries weight. The HMA fixes this by stacking weighted moving averages so that recent prices dominate, then it shortens the final smoothing window to the square root of the period. The result is a line that turns almost as fast as price but stays smooth enough to read.
On a Nifty or Bank Nifty chart this matters because these indices move fast around the open and around expiry. A laggy 20 period simple average can flag a trend change three or four candles late, which on a 5 minute chart is real money. The HMA aims to give you that same signal one or two candles earlier. The trade off is honesty about what it cannot do. Because it hugs price so tightly, it changes direction often, so treat the HMA as a fast trend filter, not as a standalone buy and sell machine.
The exact HMA formula, step by step
The HMA is built from the Weighted Moving Average (WMA), where the newest price gets the highest weight. For a window of length L, the most recent price is multiplied by L, the next by L minus 1, and so on down to 1, then the total is divided by the sum of the weights, which is L times L plus 1 divided by 2.
Building the HMA for a period n takes three layers:
- Step 1: compute WMA over n divided by 2 bars (round down). This is the fast average.
- Step 2: compute WMA over the full n bars. This is the slow average.
- Step 3: build a raw series equal to 2 times the fast WMA minus the slow WMA. Doubling the fast average and subtracting the slow one removes most of the lag.
- Step 4: smooth that raw series with one more WMA whose length is the square root of n, rounded to the nearest whole number. That final smoothed line is your HMA.
Written compactly: HMA(n) = WMA( round(sqrt(n)), [ 2 times WMA(n/2) minus WMA(n) ] ). For n equal to 9 the inner WMAs use 4 and 9 bars and the final smoothing uses 3 bars, because the square root of 9 is 3. For n equal to 16 the layers are 8, 16, and 4.
A fully worked HMA calculation on Reliance
Let us compute a 4 period HMA on Reliance Industries so every number is visible. We use a short period of 4 only to keep the arithmetic readable. For n equal to 4 the layers are WMA(2) for the fast average, WMA(4) for the slow average, and WMA(2) for the final smoothing because the square root of 4 is 2. Suppose these five Reliance closing prices (illustrative): Rs 1420, Rs 1430, Rs 1455, Rs 1448, Rs 1462.
Bar one of the raw series uses the first four closes 1420, 1430, 1455, 1448. The fast WMA(2) on the last two of these, 1455 and 1448, is (1455 times 1 plus 1448 times 2) divided by 3, which is 4351 divided by 3, equal to Rs 1450.33. The slow WMA(4) on all four is (1420 times 1 plus 1430 times 2 plus 1455 times 3 plus 1448 times 4) divided by 10, which is 14437 divided by 10, equal to Rs 1443.70. The raw value is 2 times 1450.33 minus 1443.70, which equals Rs 1456.97.
Bar two of the raw series shifts one step forward and uses 1430, 1455, 1448, 1462. The fast WMA(2) on 1448 and 1462 is (1448 plus 1462 times 2) divided by 3, which is 4372 divided by 3, equal to Rs 1457.33. The slow WMA(4) is (1430 plus 1455 times 2 plus 1448 times 3 plus 1462 times 4) divided by 10, which is 14532 divided by 10, equal to Rs 1453.20. The raw value is 2 times 1457.33 minus 1453.20, which equals Rs 1461.47.
Final step. Smooth the two raw values 1456.97 and 1461.47 with a WMA of length 2 (the square root of 4). That is (1456.97 times 1 plus 1461.47 times 2) divided by 3, which is 4379.91 divided by 3, equal to Rs 1459.97. So the HMA(4) for the latest bar sits at about 1459.97, while the plain 4 bar simple average of 1430, 1455, 1448, 1462 is only Rs 1448.75. Price closed at 1462, so the HMA at 1459.97 is hugging price far more tightly than the simple average at 1448.75. That gap is the reduced lag, shown in actual rupees.
If your HMA looks wrong, check the three lengths. For period n you need WMA(n/2), WMA(n), and a final WMA of round(sqrt(n)). For HMA(9) those are 4, 9, and 3. Get one length wrong and the line will look like a lagging average instead of a fast one.
How to read the HMA on a live chart
Two things matter when you read an HMA: its colour or slope and the price relationship. Most platforms colour the HMA green when the current value is higher than the previous value and red when it is lower. A colour flip from red to green is the earliest trend signal the indicator gives, and it usually appears one candle before a slower average would react.
The slope tells you trend strength. A steeply rising HMA means buyers are in firm control, while a flat HMA means the trend has stalled and you are likely in a range. When price trades cleanly above a rising HMA, pullbacks into the line often act as buy zones, and below a falling HMA, rallies into the line often act as short entries. Be careful with raw crossovers though. Because the HMA sits so close to price, price will cross it many times in a choppy hour and most of those crosses are noise, so slope changes are usually more reliable than a single candle poking across the line.
Best HMA settings for Indian markets
There is no single perfect period, but Indian traders cluster around a few values. Faster settings give earlier signals and more whipsaws, slower settings give cleaner trends and later entries. Match the period to your timeframe and the instrument volatility.
| Trading style | Instrument | Timeframe | Typical HMA period |
|---|---|---|---|
| Scalping | Nifty, Bank Nifty options | 1 to 3 minute | 9 |
| Intraday | Nifty, Bank Nifty, large caps | 5 to 15 minute | 21 |
| Short swing | Liquid NSE stocks | 1 hour to daily | 34 to 55 |
| Positional | Index ETFs, blue chips | Daily | 55 to 89 |
Bank Nifty moves in wider rupee swings than Nifty, so a 9 period HMA on Bank Nifty will flip more often than the same setting on Nifty. Many intraday traders prefer 21 on Bank Nifty to cut down on false flips. For slow large caps like HDFC Bank or TCS on the daily chart, 55 keeps you in the main trend without reacting to every single day candle.
Period choice changes results a lot. Before trading any HMA setting with real money, test it on at least 60 to 90 days of the exact instrument and timeframe you plan to trade, and log the win rate in your trading journal.
An illustrative Nifty options trade using an HMA signal
Here is how an HMA signal might translate into a real F&O trade with full Indian charges. These numbers are illustrative and not a prediction. Suppose the 9 period HMA on the Nifty 15 minute chart flips from red to green while Nifty spot is near 24,000, and you read it as the start of an intraday up move. You buy one lot of the Nifty 24,100 weekly call (CE) at a premium of Rs 120. The Nifty lot size is 65, so the contract controls 65 units.
Nifty grinds higher through the session, the HMA stays green and rising, and you exit when the slope flattens with the call premium now at Rs 185. Your gross gain is (185 minus 120) times 75, which is 65 times 75, equal to Rs 4,875.
Now apply realistic costs at a discount broker. Brokerage is roughly Rs 20 per order, so Rs 40 for buy plus sell. STT on options is charged on the sell side only at 0.1 percent of the sell premium turnover, which is 0.1 percent of 185 times 75, equal to about Rs 13.88. Exchange transaction charges on the round turnover of (120 plus 185) times 75 come to about Rs 8.01, SEBI fees and stamp duty add under a rupee combined, and GST at 18 percent on brokerage and exchange charges adds about Rs 8.65. Total charges are roughly Rs 71.
| Item | Value (illustrative) |
|---|---|
| Instrument | Nifty 24,100 CE weekly |
| Lot size | 65 |
| Buy premium | Rs 120 |
| Sell premium | Rs 185 |
| Gross profit | Rs 4,225 |
| Total charges (brokerage, STT, exchange, GST, stamp) | about Rs 74 |
| Net profit | about Rs 4,151 |
Net profit is about Rs 4,804 on this single lot. Remember that this profit is F&O income taxed as business income at your slab rate, not as capital gains, so there is no flat 20 percent STCG or 12.5 percent LTCG treatment here. If the HMA had been a false signal and the call had dropped from 120 to 80 before you exited, the loss would have been (80 minus 120) times 75, equal to a Rs 3,000 gross loss plus charges. That is why the stop matters as much as the entry.
Combining HMA with other indicators
The HMA tells you direction and speed but says nothing about whether a move is overstretched. Pair it with a momentum or volume tool to filter the weak signals. The most common Indian pairings are HMA with the Relative Strength Index and HMA with volume.
- HMA plus RSI: take an HMA green flip only when RSI is above 50 for longs, or below 50 for shorts. This skips counter trend flips.
- HMA plus volume: a fresh HMA turn backed by a clear jump in volume is far more trustworthy than a turn on thin volume.
- HMA plus structure: trade HMA flips in the direction of the higher timeframe trend, for example only longs when the daily HMA is rising.
- Two HMA lines: a fast 9 over a slow 21 gives a moving average crossover system that is quicker than the classic 9 over 21 EMA.
Avoid stacking three or four indicators that all measure the same thing. RSI, MACD, and Stochastic are all momentum tools, so using all three with HMA just gives you the same opinion in triplicate. One trend tool plus one momentum or volume confirm is usually enough.
HMA versus EMA and SMA
Traders often ask why they should bother with the HMA when the exponential moving average (EMA) is already fast. The honest answer is a balance of speed and smoothness. The table below summarises the practical differences.
| Property | SMA | EMA | HMA |
|---|---|---|---|
| Lag | High | Medium | Low |
| Smoothness | High | Medium | Medium to high |
| Reacts to latest price | Slowly | Faster | Fastest |
| False signals in range | Fewer | Some | More |
| Best use | Long trends | General | Fast trend turns |
In plain terms, the SMA is the calmest and slowest, the EMA is a middle ground, and the HMA is quickest to call a turn but also quickest to be wrong in a flat market. If you trade trending intraday moves on Nifty or Bank Nifty, the HMA earns its place.
Limitations, whipsaws, and risk control
The single biggest weakness of the HMA is the sideways market. Because the line tracks price so closely, a range bound session will produce a string of green to red to green flips, each one tempting you into a trade that reverses minutes later. On expiry day, when Nifty and Bank Nifty options can swing violently on theta and gamma, these false flips multiply. Many traders simply switch the HMA off or widen the period during the final expiry hour.
| Market condition | HMA behaviour | What to do |
|---|---|---|
| Strong trend | Clean signals, few false turns | Trade flips with the trend, trail the stop |
| Sideways range | Frequent whipsaws | Stand aside or widen the period |
| News or event spike | Sudden gap that HMA cannot predict | Reduce size or skip until it settles |
No indicator removes the need for a stop loss. Decide your risk per trade before entry, usually a small fixed percentage of your capital, and size the position so a wrong HMA signal costs you only that amount. In the Nifty example above, a Rs 3,000 adverse move on one lot should already fit inside a pre planned risk budget, not come as a surprise.
Whipsaws hide in memory but not in data. Record each HMA signal you act on, the timeframe, the result, and whether a confirmation was present. After 30 to 40 trades the journal will tell you which settings and which instruments your HMA edge actually works on.
Sources and further reading
For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia and NSE India. Always confirm current rules, rates, lot sizes, and contract specifications on the official source before you trade. The trade numbers on this page 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 and NSE India. Always confirm current rules, rates and contract specifications on the official source before you trade.
Related Topics
Related Articles
Understanding the Vertical Horizontal Filter in Indian Markets
How the VHF spots trending vs ranging Nifty, with real NSE regimes, a worked calculation, option tactics, and Indian F&O tax rules.
RSI 2 Period Strategy for Indian Markets
The RSI(2) mean reversion strategy for Indian markets: 200 DMA filter, exact entry and exit rules, and worked Reliance and Bank Nifty rupee examples.
Pair Trading Strategy for Indian Markets
Pair trade TCS and Infosys with real z-score math, lot sizes, rupee P&L, STT and slab-rate tax. A worked, market-neutral guide for Indian traders.
Sector Rotation Strategy in Indian Markets
Sector rotation for Indian markets with a real Nifty IT vs FMCG worked example, futures lot math, stop rules and STT and tax facts.
Understanding Dividend Arbitrage in Indian Markets
How dividend arbitrage really works in India, with a full Infosys example covering futures discount, STT, brokerage and current dividend and F&O tax.
Understanding Trading Psychology in Indian Markets
Learn trading psychology for Indian markets with a worked Nifty options example showing how fear and greed turned a Rs 3,600 loss into Rs 16,500.
The trading journal built for Indian F&O traders. 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
Yearly ₹2,499 · No broker credentials