What Is The Hull Moving Average (HMA)
The Hull Moving Average (HMA), developed by Alan Hull, is an extremely fast and smooth moving average. The HMA almost eliminates lag and manages to improve smoothing at the same time.
The HMA is a Trend indicator. This indicator uses weighted moving averages to give priority to recent values and reduces lag efficiently.
How To Calculate The HMA Indicator
The formula for the HMA uses two different weighted moving averages (WMAs) of price and a third WMA to smooth the raw moving average.
HMA = wma(2 * wma(data, period // 2) – wma(data, period), sqrt(period))
Why Use The Hull Moving Average (HMA)
The HMA reduces the lag of a traditional MA while it retains the smoothness of the MA line. This indicator utilises weighted moving averages to give priority to more recent values and significantly reduce lag. The final average is exceptionally responsive and helps to identify entry points.
How To Use The Hull Moving Average (HMA)
Moving averages are usually calculated to identify the trend direction of a stock or determine its support and resistance levels. It is a trend-following or lagging indicator because it is based on past prices.
A more extended period HMA may be used to identify trends. If the HMA is rising, the prevailing trend is rising, indicating it may be better to enter long positions. If the HMA is falling, the prevailing trend is also falling, suggesting it may be better to enter short positions.
Defining a Bullish Scenario to generate a buy signal:
- When the price crosses above the hull moving average, it indicates that the current price is greater than the average of the defined period; hence the market is in an upward trend.
- When the shorter period moving average crosses over the longer time moving average, it indicates the start of a new uptrend.
Defining a Bearish Scenario to generate a sell signal:
- When the price crosses down the hull moving average, it indicates that the current price is lower than the average of the defined period; hence the market is in a downward trend.
- When the shorter period moving average crosses down the longer time moving average, it indicates the start of a new downtrend.
Building The Hull Moving Average (HMA) Trading Strategy On Mudrex:
You can create crypto trading strategies without code on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.
As discussed above, lets first write our entry/exit conditions so that we know what to do:
BUY: When price crosses up the hull moving average
SELL: When price crosses down the hull moving average
Overall Strategy: The overall strategy on mudrex looks like this
Testing: We can now run a quick backtest to see how our strategy performs
A few quick references below: