# HullMA Based Indicators 15

The Hull Moving Average (HMA), developed by Alan Hull, is an extremely fast and smooth moving average. In fact, the HMA almost eliminates lag altogether and manages to improve smoothing at the same time. The Hull Moving Average solves the dilemma of making a moving average more responsive to current price activity whilst maintaining curve smoothness.

I prefer it over most of the other MAs method and after a chat with a friend programmer/trader (CJA) I decided to apply “common” indicators to the hull moving average to have smoothed curves and much clear signals (hoping in less false signals).

Below You’ll find the link to download a set of HullMA based indicators. I hope you’ll like them as much as I’m starting to love them.

To install them simply copy the “HullMA.mq4” indicator in the “MT4\experts\indicators” folder, along with the other “HMA_” version of the new indicators.

Make sure you don’t rename the HullMA.mq4 file as it is used by all the others to calculate the hull moving average of price.

Attached is the code of the indicators so those interested in programming MQL4 can read them and understand how this things works and develop their own “HMA version” of preferrend indicators. It is very simple.

For the RSI for example… I took the original code of the RSI and substituted all the calls to the price with a call to the HMA of the price. How?

Using the “iCustom” function. It’s one of the best function available to MQL4 programmers. It lets you “call” an external indicator, and have back its value at a specific bar. So insted of giving to the RSI the “Close” of the price I gave to it the value of the HMA indicator of the close of the price for the same bar.

So, for example:

rel= Close[k] – Close[k+1];

becomes:

rel= iCustom(NULL,0,”HullMA”,HMA_period,HMA_price,HMA_m ode,0,k) – iCustom(NULL,0,”HullMA”,HMA_period,HMA_price,HMA_m ode,0,k+1);

and that is done every time the indicators uses price data (close, high, low, etc).

For each HMA indicator there are 3 additional options related to HMA:

HMA_period (default 12) – this is the period od the HMA used to calculate the indicator. The longer the smoother but the lag increases also.

HMA_price (default 0) – this is to what we want apply the HMA:

• PRICE_CLOSE 0 – Close price.
• PRICE_OPEN 1 – Open price.
• PRICE_HIGH 2 – High price.
• PRICE_LOW 3 – Low price.
• PRICE_MEDIAN 4 – Median price, (high+low)/2.
• PRICE_TYPICAL 5 – Typical price, (high+low+close)/3.
• PRICE_WEIGHTED 6 – Weighted close price, (high+low+close+close)/4.

HMA_mode (default 3) – this is the MA method used by the HMA to smooth:

• MODE_SMA 0 – Simple moving average,
• MODE_EMA 1 – Exponential moving average,
• MODE_SMMA 2 – Smoothed moving average,
• MODE_LWMA 3 – Linear weighted moving average.

I suggest you to leave this to default (3 – LWMA).รน

Here’s the list of indicators I re-coded using the HullMA:

• ATR
• Bollinger Bands
• CCI
• MACD
• Momentum
• Price Speed And Acceleration
• QQE
• RSI
• Stochastic
• Williams %R

Below are a few screeshots showing some of the indicators in action.

In my opinion, results are interesting for most of the indicators. Now I wait for you feedback.

• Save it and unzip it.
• Copy all the “mq4″ files into your MT4/experts/indicators folder.
• Restart MT4 and you should see them all listed under “Custom Indicators” in the Navigator window.[/note]

## 15 thoughts on “HullMA Based Indicators”

• Andrea Post author

Hi Peter,

those are indicators. Not EAs.

That means that you can use them for your manual strategies.

They can also be embedded into automatic strategies but needs some coding to do that.

So for now you can simply add to your charts for manual trading as you'd use any not-smoothed indicator.

• Bruce Hands

Peter,

I haven’t gotten there yet, but just follow Andrea’s instructions and when you go up to the indicator tool bar drop down to the custom section and they should all be in there. You can apply them one at a time or as many as you can fit on a chart.

Just play around with each of them as see what they do.

• Todd

Andrea

I am checking out the indicators, pretty cool.

How do I get my chart to look like the first screen shot? You have a line that goes from red to green on your chart, I can't figure that out.

Thanks

Todd

• Todd

Andrea

I figured it out,I hope I didn't waste to much of your time.

The indicator is killer (color) What is in that thing?

Thank You

Todd

• Andrea Post author

The "simple" HullMA is the moving average I use to calculate the trend in Crescendo.

But none of the HullMA indicator is used by Crescendo.

It's a sort of trick I use to have smoothed indicators. I based them on the HullMA of price and not on price directly ๐

• Robert

Hi Andrea,

I installed all the Hull indicators into my indicators folder as per instructions along with the HullMA and did not change any indicator descriptions or names. They all display in the navigator window. They highlight and drag to the chart but do not install to the chart nor do they list themselves in installed indicator listing. What can I do to get them working?

I even deleted the whole folder of them and downloaded them again. I unziped and reinstalled them all again. Still not working. My mt4 is working just fine and will display any other indicator in the nav. window.

Hoping you can figure this one out.

Robert

• Andrea Post author

Robert,
when you install them in the indicators folder, then you have to restart MT4.
And in the "Custom Indicators" section of the Navigator you'll see now ADDITIONAL indicators all starting with "HMA_"+something.
Those are the smoothed version of the regular indicators. You should drag and drop to the chart the HMA_ version to have the smoothed version.
Let me know.

• George

Hello Andrea,
New mT4 Build 600 out. The HullMa will not work. It compiles alright, but with the new debug feature, it shows the error array out of range. The editor shows line 67 to be the problem. Any solution to this ?

I like all the combos you have created from the HullMa.

Thankyou,

George

• Leticia

Thank you very much for these indicators. I’ve always loved HullMA and LWMA so having all the other fav indies re-configured based on HullMA is a dream come true! God bless you guys!

• Doug

Hi Andrea,
Just downloaded and installed the HullMA indicators into my Indicators folder. I have MT4 build 670. None of them will load onto a chart. Any idea why?
Thanks

• Paolo

Hi Doug, please send an email to support with a recent log file (in the “MQL4\Logs” folder) as attachment.