Home/Indicators/Hull Moving Average on XAUUSD
TrendNo. 206 min read

Hull Moving Average on XAUUSD

The fast MA that reduces gold trading lag

The Hull Moving Average was built specifically to solve the lag problem of traditional MAs. On gold's fast-moving charts, being 4-8 bars earlier into a trend move can make the difference between a profitable trade and a missed one. This guide explains the formula, how to use HMA on XAUUSD, and why gold EAs prefer it.

HMA vs EMA vs SMA: Lag at Reversal Point

PeakHMA turnsEMA turnsSMA turnsHMA (N=20): FastestEMA (N=20): Medium LagSMA (N=20): Slowest

All three using the same 20-period parameter

HMA Lag: ~1 barEMA Lag: 3-4 barsSMA Lag: 8-10 bars
01

Alan Hull's Moving Average: The Formula Behind the Speed

The Hull Moving Average was developed by Australian trader Alan Hull in 2005 with the specific goal of producing a moving average that was both fast (responsive to price changes) and smooth (free from the whipsaw noise that plagues shorter-period standard MAs). Standard moving averages, including EMA, face an inherent trade-off: shorter periods reduce lag but increase noise, while longer periods reduce noise but increase lag. The HMA breaks this trade-off.

The formula uses Weighted Moving Averages (WMA), which weight recent data more heavily than older data in a linear fashion. The key insight is to calculate a WMA over n/2 periods (half the full period), multiply it by 2, and then subtract a WMA over the full n periods. This subtraction removes the bulk of the lag. The result is then smoothed with a WMA over the square root of n periods (sqrt(n)). In shorthand: HMA(n) = WMA(2 * WMA(n/2) - WMA(n), sqrt(n)).

The mathematical effect is that the double-WMA subtraction step shifts the moving average forward in time, making it appear to "anticipate" price moves rather than trail behind them. The final sqrt(n) smoothing period prevents the de-lagged line from being excessively noisy. The overall result is a moving average that tracks price approximately as closely as a WMA of period sqrt(n), but as smoothly as a WMA of the full period n. For gold traders, this combination provides early trend signals without sacrificing the visual clarity needed to make confident trading decisions.

02

HMA vs EMA vs SMA on XAUUSD: The Lag Test

The practical difference between HMA, EMA, and SMA on gold charts becomes dramatically apparent at trend reversal points. At any significant XAUUSD reversal, the three moving averages will diverge, revealing the lag each one introduces. Using identical 20-period settings, the HMA typically changes direction within 1-2 bars of the actual price reversal. The EMA follows approximately 3-4 bars later. The SMA requires 8-10 bars to reflect the reversal.

On a M15 gold chart, 8-10 bars represents 2 to 2.5 hours. This means an SMA-based signal at a reversal on the M15 chart arrives two-plus hours after the actual turning point in gold. During those two hours, gold can easily move 50-100 pips against a trader who entered based on the old trend direction suggested by a lagging SMA. The HMA reduces this exposure by turning within 15-30 minutes (1-2 bars on M15) of the actual reversal.

For gold scalpers specifically, this lag reduction translates directly to profitability. A scalp trade targeting 20-30 pips of profit depends on entering early in the new move, not halfway through it. The difference between entering a long trade one bar after the reversal versus eight bars after the reversal can be the difference between a successful 25-pip capture and a 5-pip capture with much higher stop-loss risk. This is why HMA has become the preferred moving average type in many professional XAUUSD scalping systems.

03

Reading the Hull Moving Average on Gold Charts

The HMA provides clear, readable trend signals that are straightforward to interpret on XAUUSD charts. The primary signal is the direction of the HMA slope: a rising HMA with price above it indicates an uptrend, while a falling HMA with price below it indicates a downtrend. Unlike lagging MAs where the signal can be ambiguous for several bars around a reversal, the HMA's fast response means the slope change is decisive and quick.

The slope change from rising to flat to falling is an early warning signal. Most HMA implementations color-code the line: green when the HMA value is higher than its previous value (rising), red when it is lower (falling). This color change provides the trend direction signal. Because the HMA turns quickly, the color change from green to red (or red to green) is a genuine early signal of a trend shift, not a lagging confirmation that the move is already well underway.

Price relationship to the HMA also provides information. In a well-established uptrend on gold, price will pull back to the HMA and find support there during normal consolidations. A close below the HMA during an uptrend signals weakening momentum. When price closes convincingly below a rising HMA line, it is an early warning that the trend may be reversing, typically one of the first signs before a more definitive reversal confirmation arrives from other indicators.

04

Hull Moving Average Crossover Strategies on XAUUSD

Hull Moving Average crossover strategies use a fast HMA crossing a slower HMA as the entry trigger. The most commonly tested settings for XAUUSD are HMA(9) crossing HMA(16), or HMA(14) crossing HMA(21). Because HMA reacts to price changes much faster than EMA or SMA, crossovers happen significantly earlier, allowing traders to enter trending moves while they still have substantial room to run.

For example, at a major XAUUSD reversal from a downtrend to an uptrend, an HMA(9)/HMA(16) crossover might occur 5-6 bars before an EMA(9)/EMA(16) crossover using identical periods. On a H1 chart, this represents 5-6 hours of earlier entry, which during a strong gold trend move (50-150 pips) translates to capturing a much larger portion of the total move.

Adding an ADX filter improves this system significantly. If ADX (14-period) is below 20, indicating a non-trending market, crossover signals should be ignored because the HMA will whipsaw back and forth in choppy conditions even faster than EMA crossovers. Only when ADX rises above 25, confirming that a genuine trend is in progress, should HMA crossovers be acted upon. The combined HMA crossover with ADX trend strength filter produces a system that captures strong XAUUSD trends early while avoiding the choppiness that generates excessive false signals in ranging markets.

05

Best HMA Settings for Gold Scalping vs Swing Trading

The optimal HMA period depends heavily on your trading timeframe and the holding duration of your gold trades. For scalping on M5 to M15 charts, HMA(9) is commonly used as the primary trend signal, while HMA(14) provides a slightly smoother but still fast signal for slightly longer intraday trades. At these short periods, the HMA's main advantage is clear: it turns quickly enough to provide actionable signals within the tight profit windows that scalpers require.

For swing trading on H1 to H4 charts, HMA(20) to HMA(50) covers the relevant trend periods for multi-session to multi-day gold moves. HMA(20) on H1 provides a smooth trend line that captures the intraday directional bias without being too reactive to temporary counter-moves during active sessions. HMA(50) on H4 filters out shorter-term noise and reflects the weekly trend bias on gold, making it useful as a directional filter for entering only in the direction of the dominant multi-day move.

For daily and weekly trend analysis, HMA(200) acts as the ultimate macro filter for gold. When the HMA(200) on the daily chart is rising, the macro trend is bullish and any pullbacks should be considered buying opportunities. When it is falling, the macro trend is bearish. Gold traders prefer shorter HMA periods than stock traders for the same timeframe because XAUUSD has higher volatility and faster trend changes, meaning a given period of time contains more meaningful trend information on gold than on most equity indices.

06

Hull MA in Gold EA Development: Why It Is Preferred Over SMA

In algorithmic gold trading, the choice of moving average type directly affects the timing and profitability of every trend-following signal an EA generates. EAs using SMA for trend direction inherit all of SMA's lag, meaning they enter trends later and with worse average prices than systems using HMA. Over hundreds of trades, this lag creates a systematic drag on performance that compounds into a significant return difference.

EAs built with HMA-based trend detection get their directional signals earlier, reducing the average distance from entry to the first profit target. This translates directly to improved reward-to-risk ratios on individual trades. When a gold EA using SMA enters a long trade 8 bars after a reversal, the initial stop below the low of the reversal candle is relatively far from the current price, creating a poor R:R setup. The same trade taken 1-2 bars after the reversal using HMA has the stop only marginally farther away but a much larger potential profit target still available.

The Goldie family of EAs uses fast-reacting trend detection logic built around the principle that early, accurate trend identification is more valuable than smooth but lagged confirmation. This philosophy is directly aligned with HMA's design objective. By detecting gold's trend direction sooner, the EAs can enter at more favorable prices, size positions more aggressively in high-confidence environments, and exit before reversals become losses rather than after. The HMA represents the right tool for the core challenge of gold EA design: being early enough to profit, while being smooth enough to avoid chasing noise.

Trade XAUUSD With the Right Tools

Our EAs use fast-reacting trend detection on XAUUSD, entering gold trends earlier and with better R:R than SMA-based systems.

Goldie Sniper EA PRO, Goldie Razor V2, and Blind Sniper X PRO all apply HMA-inspired trend logic calibrated for gold. Contact us to find out which EA suits your trading style.