The Hull Moving Average (HMA) is a technical indicator developed by Alan Hull, designed to reduce lag compared with many traditional moving averages while remaining smoothed and readable. It achieves this by combining three nested Weighted Moving Averages — doubling a half-period WMA, subtracting a full-period WMA, then smoothing the result with a WMA whose length equals the square root of the original period. TradingView includes HMA as a built-in overlay you can add in one click, configure with a length parameter, and pair with Bar Replay to practice reading signals on historical candles.
Disclaimer: All examples and parameter suggestions in this article are for educational purposes only and do not constitute investment advice. Any strategy requires individual backtesting and proper risk management before use in live markets.
Key Takeaways
- The HMA formula is
HMA = WMA(2 × WMA(n/2) − WMA(n), √n)— three nested Weighted Moving Averages structured to reduce lag. - TradingView includes HMA as a built-in indicator; a common starting length in many examples and tutorials is 20, though the platform's current default may vary — verify in the indicator panel.
- Alan Hull recommends watching for HMA turning points (direction changes) as entry signals rather than crossover signals.
- Shorter lengths (9–21) are common starting points for intraday charts; longer lengths (50–200) are used as trend filters on higher timeframes. These are starting ranges, not fixed optimal settings.
- You can practice reading HMA signals on past data using TradingView's Bar Replay tool, or by stepping through historical K-line charts on a browser-based tool like ChartMini.
What the Hull Moving Average Is and Why It Matters
Most moving averages present a trade-off: smooth the line and you introduce lag; reduce lag and the line becomes noisy. Alan Hull's insight was to use Weighted Moving Averages — which already emphasize recent prices — and layer them so that lag is reduced while smoothness is preserved.
According to Hull's own explanation, the goal is "solving the age-old dilemma of making a moving average more responsive to current price activity whilst maintaining curve smoothness" (alanhull.com). On TradingView, the HMA behaves like any other moving average overlay: it plots directly on the price chart and visually reflects trend direction as the line rises or falls.
How HMA Compares with SMA, EMA, and WMA
| Feature | SMA | EMA | WMA | HMA |
|---|---|---|---|---|
| Weighting | Equal | Exponential | Linear | Composite (nested WMAs) |
| Lag (same length) | Highest | Moderate | Lower | Lower in many cases |
| Smoothness | High | Medium | Medium | High |
| Responsiveness | Slow | Faster | Faster | Very responsive |
| Typical use | Long-term structure | General purpose | Weighted trend | Quick trend and entry signals |
The HMA does not simply weight recent prices more heavily — it subtracts the full-period average from a doubled half-period average, then smooths the difference. This is why it can react faster than an EMA of the same length in trending conditions while producing a cleaner line. In choppy, range-bound markets, however, this responsiveness can generate more false turns.
The Hull Moving Average Formula, Step by Step
The formula involves three nested calculations:
HMA = WMA( 2 × WMA(n/2) − WMA(n) , √n )
Here is what each piece does:
- WMA(n/2) — Calculate a Weighted Moving Average over half the specified period, then multiply by 2. This amplifies the weight of the most recent price action.
- WMA(n) — Calculate a standard WMA over the full period. This provides the baseline trend reference.
- Subtract —
2 × WMA(n/2) − WMA(n)creates a "raw HMA" that amplifies short-term movement while reducing the lag from the full-period average. - WMA(√n) — Smooth the raw HMA with a WMA whose length is the square root of n (rounded to the nearest whole number). This final step removes jitter without reintroducing significant lag.
Sources for the formula: alanhull.com, StockCharts ChartSchool, Fidelity Learning Center.
Worked Example: n = 20
| Step | Calculation | Period Used |
|---|---|---|
| Half-period WMA | WMA(10) × 2 | 10 |
| Full-period WMA | WMA(20) | 20 |
| Raw HMA | 2 × WMA(10) − WMA(20) | — |
| Final smoothing | WMA(Raw HMA, √20 ≈ 4) | 4 |
The square root of 20 is approximately 4.47, which rounds to 4. The final HMA line is therefore a 4-period WMA of the raw values — short enough to remain very responsive, yet smoothed enough to reduce constant whipsaws in trending conditions.
Why the Formula Reduces Lag
Traditional moving averages lag because they include older prices that pull the average away from current price. HMA addresses this by:
- Doubling the half-period WMA — amplifies the weight of the most recent data.
- Subtracting the full-period WMA — cancels out much of the remaining lag from older data.
- Smoothing with √n periods only — applies a very short final average, so no significant new lag is introduced.
The result is a line that responds faster than a same-length EMA in many trending environments. How much faster depends on the instrument, timeframe, and market condition — this is something to verify on each market you trade.
Is HMA a Leading or Lagging Indicator?
Technically, the HMA is a lagging indicator — every value is derived from past prices. It does not predict the future. What it does is reduce lag compared with many traditional moving averages of the same length, so it often appears to react earlier at price reversals. Calling it "leading" would overstate its nature; the more accurate description is "reduced-lag lagging indicator."
How to Add the Hull Moving Average in TradingView
TradingView includes the Hull Moving Average as a built-in indicator — no Pine Script or custom code required (TradingView HMA documentation).
Step-by-Step Setup
- Open any chart in TradingView Supercharts.
- Click the Indicators button (or press
/on your keyboard). - Type "Hull Moving Average" in the search box.
- Click the result under Built-in → Moving Averages.
- The HMA line appears on your price chart.
Configurable Parameters
The core calculation parameter is Length. TradingView also allows you to adjust Source, Offset, and visual style:
| Parameter | Common Starting Value | Description |
|---|---|---|
| Length | 20 (verify in panel) | The lookback period (n) for the HMA calculation |
| Source | Close | Price data used (close, open, high, low, HL/2, etc.) |
| Offset | 0 | Shifts the line forward or backward on the time axis |
Always confirm the current default directly in the TradingView indicator settings panel, as platform defaults may change across versions.
HMA Settings: How to Choose a Length Without Curve-Fitting
Choosing a length involves balancing two risks: too short and the line whipsaws frequently; too long and signals arrive too late. The following table provides common starting ranges, not prescriptive "best" settings. Adjust based on what you observe in your specific market and timeframe.
| Trading Style | Common Starting Length | Timeframe | Adjustment Rule |
|---|---|---|---|
| Scalping | 9–10 | 1m – 5m | Shorten only if signals are too late; lengthen if whipsaws dominate |
| Day trading | 14–21 | 5m – 1H | Start at 14 or 20; tune based on how often false turns appear |
| Swing trading | 34–55 | 1H – Daily | 55 works well as a trend filter; use shorter for entries |
| Position trading | 100–200 | Daily – Weekly | Prioritize smoothness; lag is less critical at this scale |
The single most reliable rule: start with the platform's default, compare it with an SMA of the same length on historical data, and adjust by one step at a time. Do not optimize heavily on a single historical period — results are unlikely to transfer.
Using HMA as a Trend Filter
One of the most common applications is using a longer-period HMA as a directional gate and a shorter-period HMA (or price action) for entries.
The Dual-HMA Trend Filter Approach
- Trend direction — Add a 55-period or 100-period HMA. If it slopes upward, look only for long setups; if it slopes downward, look only for shorts.
- Entry trigger — Add a second, shorter HMA (e.g., 14 or 20). When it turns in the direction of the trend, that is your candidate entry signal.
- Exit — When the shorter HMA turns against your position, consider closing or tightening your stop.
These are filtering conditions, not buy/sell recommendations. The approach still requires backtesting, confirmation from additional context (volume, structure, news), and proper risk management.
Why Hull Discourages Crossover Signals
Alan Hull has noted that crossover systems depend on the lag differential between two lines. Because the HMA is designed to reduce lag, the two lines tend to track each other closely, so crossover signals lose their edge. Instead, he recommends watching for turning points — moments when the HMA changes direction — as the primary signal. This view is summarized on StockCharts ChartSchool based on Hull's original methodology.
The practical implication: rather than waiting for one HMA line to cross another, watch for the moment a single HMA line flattens or changes slope. That is typically the earlier signal.
HMA Color-Slope Visualization
Many traders on TradingView customize the HMA to change color based on its slope:
- Green (or custom rising color) — current HMA value is greater than the previous bar's HMA.
- Red (or custom falling color) — current HMA value is less than the previous bar's HMA.
This makes trend direction visible at a glance without interpreting the angle of the line.
How to Test HMA Lag on Historical K-Line Data
Understanding the lag difference between HMA and a traditional moving average is easier when you observe it directly on past charts. The following exercise provides a structured approach.
Lag Verification Worksheet
Run this exercise on at least 10 distinct reversal samples before drawing conclusions about how HMA behaves on a specific instrument and timeframe.
| # | Symbol | Timeframe | HMA Length | SMA Length | HMA Turn Bar | SMA Turn Bar | Bars Difference | False Turn? |
|---|---|---|---|---|---|---|---|---|
| 1 | ||||||||
| 2 | ||||||||
| … |
How to fill in the worksheet:
- Open a historical chart with a clear trend followed by a visible reversal.
- Add both a same-length SMA and an HMA (e.g., both at length 20).
- Identify the reversal candle where price meaningfully changes direction.
- Note the bar at which the HMA line changes slope and the bar at which the SMA line changes slope.
- Record the difference. Also note whether the HMA turn turned out to be a false signal.
In many trending samples, the HMA tends to turn earlier than a same-length SMA. How many bars earlier — and how often false turns appear — varies by instrument, period, and market condition. Your own recorded samples will be more reliable than any generic benchmark.
Replay Practice Checklist
Before each replay session, confirm:
- HMA length matches the timeframe (start with default, adjust if needed)
- Same-length SMA is also on the chart for direct comparison
- You are stepping through candles one at a time, not scrubbing forward
- You are recording decisions before seeing the next candle
- You log entries, HMA slope at entry, and outcome in your worksheet
You can run this exercise using TradingView's built-in Bar Replay tool (TradingView Bar Replay). For browser-based historical K-line practice, ChartMini lets you step through past candles and manually observe where the moving average line turns relative to price — a straightforward way to build intuition about lag without needing to set up a full platform environment.
Common Mistakes When Using the HMA
| Mistake | Why It Hurts | Fix |
|---|---|---|
| Using HMA alone without confirmation | Fast indicators can whipsaw in ranges | Pair with RSI, volume context, or a longer MA filter — these are filters only, not guarantees |
| Relying on HMA crossovers | Low-lag MAs have similar lag, so crossovers lose their edge | Use turning points instead |
| Over-optimizing the length | Curve-fitting to past data rarely transfers | Start with the platform default; adjust by one step at a time |
| Applying HMA in choppy, range-bound markets | HMA turns quickly, generating false signals | Check ATR or ADX first to confirm a trending environment |
| Ignoring the broader trend | Counter-trend HMA signals fail often | Use a long-period HMA (100+) as a directional gate |
| Treating any moving average signal as a trade instruction | No indicator predicts the future | Any signal is a hypothesis — confirm with structure, volume, and risk management |
HMA vs. Other Moving Averages: When Each May Be Useful
| Scenario | Possible MA Choice | Reason |
|---|---|---|
| Long-term trend reference on a weekly chart | SMA 200 | Stability and wide recognition matter more than speed |
| Fast entry signals on intraday charts | HMA 9–14 | Reduced lag is valuable when timing is critical |
| Swing trade with one smoothing line | HMA 34–55 | Balances responsiveness and reliability in trending markets |
| Crossover-based system | EMA 9/21 pair | Crossover logic relies on lag differential; EMA suits this better |
| Volume-weighted reference level | VWAP | Price × volume context that HMA does not provide |
No single moving average is universally superior. HMA's strength is in reducing lag for trend detection and entry timing; for long-term structure, volume context, or crossover systems, other tools may be more appropriate.
FAQ
What is the Hull Moving Average?
The Hull Moving Average (HMA) is a technical indicator developed by Alan Hull. It uses nested Weighted Moving Averages structured to reduce the lag found in traditional moving averages while keeping the plotted line smooth. Traders use it primarily for trend direction and entry timing.
What is the HMA formula?
HMA = WMA(2 × WMA(n/2) − WMA(n), √n)
It doubles a half-period WMA, subtracts a full-period WMA, then smooths the result with a WMA whose length is the square root of n.
How do I add HMA to TradingView?
Open TradingView Supercharts, click Indicators, search for "Hull Moving Average," and click the result under Built-in → Moving Averages. The indicator will appear on your price chart. Adjust Length in the settings panel.
Is HMA a leading or lagging indicator?
HMA is a lagging indicator — all its values are calculated from past prices. It is designed to reduce lag compared with many traditional moving averages of the same length, so it often reacts earlier at price reversals than an SMA or EMA. It does not predict future price direction.
Should I use HMA crossovers for signals?
Alan Hull, the indicator's creator, recommends against relying on crossovers with HMA. Because the indicator is designed to minimize lag, two HMA lines track each other closely and the lag differential that drives useful crossover signals is reduced. Watch for turning points — moments when the HMA line changes direction — instead.
What HMA length should beginners start with?
Start with your platform's current default length (commonly shown as 20 in many tutorials — verify in the indicator panel). Observe how it behaves on the charts you actually trade, then adjust by one step at a time. Avoid heavy optimization on a single historical period.
Does HMA work better in trending or ranging markets?
HMA performs more clearly in trending markets, where its reduced-lag turns can provide earlier signals. In choppy, range-bound conditions, the high responsiveness can produce frequent false turns. Use ATR or ADX to confirm that a trend exists before relying on HMA signals.
How can I test whether HMA is less laggy than SMA?
Add both a same-length SMA and an HMA to a historical chart. Step through past candles one by one using TradingView's Bar Replay, and record the bar at which each line turns at a reversal. Log your results in a worksheet over multiple samples to form a data-based view of how the two lines behave in the markets you trade. ChartMini offers browser-based historical K-line charts where you can do the same manual observation without additional setup.
References
- Alan Hull, "The Hull Moving Average," alanhull.com
- StockCharts ChartSchool, "Hull Moving Average (HMA)," chartschool.stockcharts.com
- TradingView, "Hull Moving Average," tradingview.com
- Fidelity Learning Center, "Hull Moving Average," fidelity.com