HMA Bollinger Bands: what changes with a Hull midline, tested
HMA Bollinger Bands swap the simple moving average midline for a Hull moving average. The bands turn earlier and sit closer to price, so they fire more often with less move per signal. The band logic itself stays the same, and only a side-by-side test after costs tells you whether the trade-off helps on your market.
By Soren Huang · Published · updated · Editorial policy
Contents
- What happens when Bollinger Bands are built on a Hull moving average?
- How is the Hull moving average built, and which period should you use?
- What changes when you swap the band midline from SMA to HMA?
- How do band width and signal frequency change with an HMA midline?
- Reversion or breakout: which test does the HMA band pass?
- Is HMA Bollinger better than standard Bollinger, and does it react too early?
- Frequently asked questions
- References
What happens when Bollinger Bands are built on a Hull moving average?
HMA Bollinger Bands replace the simple moving average midline with a Hull moving average, so the bands turn earlier and sit closer to price. The band logic stays the same: a multiple of the standard deviation above and below the midline. The cost of the earlier turn is more touches, more false touches and less price move per signal.
Bollinger Bands are a channel drawn around a moving average, with the upper and lower lines placed a fixed number of standard deviations (usually two) away from it. The standard version uses a 20-bar simple moving average (SMA) as the midline. A Hull moving average (HMA) is a moving average built so that it follows price with very little delay while staying smooth. The HMA Bollinger Bands indicator page defines the combined indicator in full; this article is about what the swap changes in a test.
Think of a thermometer that reports the mixed temperature of the last twenty minutes. That is the SMA: smooth, but slow to notice that a window was opened. The HMA weights the last few minutes heavily, so it reports the change almost at once, and it also reports every short draught that passes. Everything that follows comes from that one difference. The channel geometry, the multiplier and the standard deviation all stay as they are in standard Bollinger Bands; only the line in the middle moves earlier.
How is the Hull moving average built, and which period should you use?
The Hull moving average combines two weighted averages of half and full length and then smooths the difference over the square root of the period, so start with the same length as the SMA you are replacing and test the neighbouring periods before you change anything else. A weighted moving average (WMA) is a moving average that gives the most recent bar the largest weight and the oldest bar the smallest, so it already reacts faster than an SMA of the same length. The Hull moving average page covers the indicator on its own; here is the construction in three steps.
- Take a WMA of half the period. For a period of 20, that is a 10-bar WMA. This line is fast but rough.
- Take a WMA of the full period, and subtract it from twice the half-period WMA. Doubling the fast line and subtracting the slow line pushes the result ahead of both, which removes most of the lag. It also makes the line rough.
- Smooth the result with a WMA whose length is the square root of the period. For a period of 20 the square root is about 4.5, so platforms round it to 4 or 5. This short smoothing removes the roughness without adding back much lag.
Written as one line, the formula is HMA(n) = WMA(2 × WMA(n ÷ 2) − WMA(n), √n), where n is the period you choose, WMA(n ÷ 2) is the weighted average over half that period, WMA(n) is the weighted average over the full period, and the outer WMA(…, √n) smooths the difference over the square root of the period.
For the period, keep the number you are already using for the standard bands. If your standard bands use SMA 20, build the first HMA version with HMA 20, so the only thing that changed is the type of average. Then test the neighbouring values, for example 14, 16, 20, 25 and 30, and look at whether results change smoothly from one period to the next or jump at a single value. A period that is a perfect square, such as 16 or 25, avoids the rounding in the square-root step, which makes results easier to reproduce across platforms. Change the multiplier (the number of standard deviations) only after the period question is settled, so that you never move two settings at once.
What changes when you swap the band midline from SMA to HMA?
Swapping the midline changes lag, band centering and overshoot at turns, but it does not change what the bands measure, so compare the two versions on identical data, costs and settings. Lag is the number of bars between a change in price and the same change in the indicator. On a steady trend, an SMA of period n lags price by about half the period, so SMA 20 sits roughly nine to ten bars behind. The HMA sits close to the current price on a steady trend. Overshoot is the opposite problem: when a trend slows or pauses, the HMA keeps moving in the old direction for a bar or two and then bends past the new level, because step 2 of its construction projects the recent slope forward.
| Property | SMA midline | HMA midline |
|---|---|---|
| Lag at turns | Several bars (about half the period on a trend) | About one bar |
| Overshoot after a turn or pause | Low | Higher |
| Position of the bands relative to recent price | Centred on the older average | Centred close to the latest bars |
| Band logic (deviation × multiplier) | Same | Same |
| Parameters to set | Period, multiplier | Period, multiplier |
Because only the midline moves, the swap is a clean experiment: one input changed, everything else held. That is the kind of comparison the guide to technical analysis tools and indicators recommends for any indicator variation, and it is the only way to attribute a difference in results to the Hull average rather than to a different period, a different session or a different cost setting. Run the SMA version and the HMA version on the same bars, the same session hours, the same commission and slippage, and the same next-bar fills, and read the two reports side by side.
How do band width and signal frequency change with an HMA midline?
Because price sits closer to a fast midline, the bands sit closer to price, touches happen more often and each signal carries less average move, which makes commission and slippage decide the result. A band touch is a bar whose high reaches the upper band or whose low reaches the lower band. With a lagging midline, price has to travel a long way from the old average to reach a band, so touches are rarer and the move back to the midline is longer. With the HMA midline, the whole channel moves with the latest bars, so a smaller swing already reaches a band.
The width itself depends on how your platform computes the deviation. If the standard deviation is measured around the midline, the HMA bands are narrower, because a fast midline leaves smaller distances between price and average. If the platform keeps the standard deviation of the closes themselves, the width is unchanged and only the centre moves. In both cases the bands end up closer to the recent price, and the touch count rises.
Hypothetical example
Suppose that over one year the standard bands produce 40 lower-band touches and the HMA bands produce 90 on the same chart, and that the average move from a touch back to the midline is 30 points for the standard version and 14 points for the HMA version, on a contract worth $20 per point. Gross per touch: $600 against $280. With a round-trip cost of $30 for commission and slippage, costs take 5 percent of the standard version's gross move and about 11 percent of the HMA version's. Double the slippage to a $60 round trip and the shares become 10 percent and about 21 percent. The HMA version is more than twice as sensitive to the cost estimate.
This is why a cost-free backtest flatters the HMA version more than the SMA version: it rewards the extra signals and never charges for them. AlphaPrime (Valynox) charges fees and slippage inside each candidate during backtesting and fills on the next bar, so a band version that fires twice as often is ranked after paying for every one of those fills. Whatever software you use, set the costs before the first run, not after the ranking.
Reversion or breakout: which test does the HMA band pass?
Run the band as a mean-reversion rule and as a breakout rule on the same bars with the same costs, and judge them with a pass rule written in advance; the stand-in run below shows what one kept candidate from a search looks like and why its result flatters itself. A mean-reversion rule enters at the outer band and aims for the midline, betting that the stretch away from the average will close. A breakout rule enters when price pushes through the outer band and follows the move, betting that the stretch will extend. The same bands can be read both ways, and they cannot pass both tests on the same market and bar size at once. The reversion reading is the common one, as the Bollinger Bands strategy backtest explains for the standard version.
- Load the same bars and the same session for both tests, with the final months of history kept outside the run.
- Set the same commission and slippage per trade, and the same next-bar execution.
- Run the reversion rule: enter at the outer band toward the midline, exit at the midline.
- Run the breakout rule: enter through the outer band in the direction of the move, exit at the opposite band or the midline.
- Compare average trade after costs and trade count under a pass rule you wrote before step 1, for example a positive average trade with doubled slippage and at least a hundred trades.
Brock, Lakonishok and LeBaron (1992) tested moving-average and trading-range breakout rules in this spirit, with the rules fixed before the data was read, which is the reason their study is still cited. To show what a breakout-type result looks like in a real report, we ran a search on NQ daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $10 slippage per trade. The rule tested is a stand-in, not HMA Bollinger Bands: it enters and exits on a Highest and Lowest rule, the kind of channel breakout described in the Donchian channel breakout rules, with no stop, no target and no filter. The search tried about a thousand candidates and kept this one for its return against its drawdown.
Source: AlphaPrime product engine (CPU), run 2026-10-31. NQ daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $10 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $58,910 |
| Max drawdown | $33,420 |
| Trades | 91 |
| Win rate | 59.34% |
| Profit factor | 1.492 |
| Average trade | $647.36 |
| Time in market | 11.84% |

Read the numbers as a shape, not as a result to expect. The average trade of $647.36 is large against the $30 round-trip cost, which is typical of a daily-bar breakout rule that trades rarely: 91 trades in six and a half years, in the market 11.84 percent of the time. The max drawdown of $33,420 is more than half of the $58,910 net profit, so the equity curve is uneven. Most important, this candidate was chosen after the fact out of about a thousand, and the best of many tries always looks better than it will behave on new data; Bailey, Borwein, López de Prado and Zhu (2014) show how quickly that selection bonus grows with the number of candidates. Neither the Highest and Lowest rule nor an HMA band earned this money; the number is what one survivor of a search looks like before validation.
Is HMA Bollinger better than standard Bollinger, and does it react too early?
The HMA version is not better by default: it reacts earlier at real turns and also earlier at pauses that are not turns, so the trade-off is earlier entries against more overshoot signals, and only a side-by-side test after costs settles it for your market. When a trend pauses for a few bars, the HMA midline bends into the pause and the band on the far side can touch price, while the SMA midline keeps rising through the pause and no band is touched. If the trend then continues, the HMA signal was early and wrong. If the pause was the start of a reversal, the HMA signal was early and right, and the SMA version entered several bars later at a worse price.
Which side wins depends on how often pauses turn into reversals on your market and bar size, and that is a measured quantity, not an opinion. Park and Irwin (2007) reviewed decades of technical-rule studies and found that reported results depend heavily on the costs assumed and on how many rules were tried before the published one; the same two things decide the HMA question. A practical way to reduce early signals is to require confirmation, for example a close back inside the band or a second touch near the first, which is how the double bottom pattern rules turn a single low into a tested reversal condition. Each confirmation removes some early signals and some good ones, so it goes through the same side-by-side test.
The next step is one experiment you can run this week: take the band strategy you already trade or test, change only the midline from SMA to HMA at the same period, keep every cost and session setting, and write down before running it what average trade after doubled slippage you would need to switch. Then run both versions and read the two reports against that number.
Frequently asked questions
Is HMA Bollinger better than standard Bollinger?
Not by default. The HMA midline removes most of the lag, so the bands turn earlier at real reversals, but they also react to pauses that are not reversals and fire more often. Whether the earlier entries pay for the extra false signals depends on your market, bar size and costs, so run both versions on the same data with the same commission and slippage and compare the average trade.
What period should the HMA use in Bollinger Bands?
Start with the same period as the SMA you are replacing, usually 20, so that only the type of average changes. Then test neighbouring values such as 14, 16, 25 and 30 and look for a range where results change smoothly rather than one value that stands out. Perfect-square periods like 16 or 25 avoid rounding in the square-root smoothing step, which makes results easier to reproduce across platforms.
Does the Hull moving average react too early?
It reacts earlier than an SMA, and sometimes that is too early. Its construction projects the recent slope forward, so when a trend slows the HMA bends past the new level and can pull a band onto price while the move is only pausing. Requiring a confirmation, such as a close back inside the band, removes part of these early signals at the cost of a later entry.
How do you use HMA Bollinger Bands in a strategy?
Decide first whether you read the band as mean reversion (enter at the outer band toward the midline) or as breakout (enter through the outer band with the move), because the same bands cannot be both on one market. Write the entry, exit, costs and a pass rule before testing, run the rule with next-bar fills, and judge it by the average trade after commission and slippage with the slippage doubled. Keep the most recent months of data out of the test for one final check.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple Technical Trading Rules and the Stochastic Properties of Stock Returns. The Journal of Finance, 47(5), 1731–1764.
- Park, C.-H., & Irwin, S. H. (2007). What Do We Know About the Profitability of Technical Analysis? Journal of Economic Surveys, 21(4), 786–826.

