Hull Moving Average
The Hull Moving Average makes a moving average more responsive while maintaining a curve smoothness. The formula for calculating this average is as follows: HMA[i] = MA( (2*MA(input, period/2) – MA(input, period)), SQRT(period)) where MA is a moving average and SQRT is square root. The user may change the input (close), period length and shift number. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using the Hull Moving Average
The Hull Moving Average is a lagging trend indicator and may be used in conjuction with other studies. No trading signals are calculated.
How To Access in MotiveWave
Go to the top menu, choose Study>Moving Average>Hull Moving Average
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
//input = price, user defined, default is close
//method = moving average (ma), user defined, default is WMA
//period = user defined, default is 20
//shift = user defined, default is 0
//wma = weighted moving average, sqrt = square root
//index = current bar number, LOE = less or equal
sqp = Math.sqrt(period); for(i = period; i lessThan size(); i++) if (isComplete(i)) continue; ma1 = 2*ma(method, i, period/2, input); ma2 = ma(method, i, period, input); if (ma2 == null) continue; MA_TMP[i] = ma1 - ma2; endFor end = size()-1; start = 0; if (start LOE period+sqp) start = period + sqp; lastComplete = size()-1; if (shift lessThan 0) lastComplete += shift; for(i = start; i LOE end; i++) if (isComplete(i+shift)) continue; value = ma(method, i, sqp, MA_TMP); if (value == null) continue; Plot: MA[i+shift] = value; endFor