Indicators: Hull moving average - page 2

 
winloosewin:

I have found a bug in my code. It only occurs if "period" is very large (e.g. 50000) (due to an integer overflow).

I have a corrected version in the attachment.

I have an EA that indeed uses both smaller and larger periods. You may call iCustom() with a timeframe that is bigger than the one the

EA is attached to if you do not need the indicator be drawn on the chart. Then the "period" parameter could be respectively smaller.

But I prefer to leave the user the freedom whether to do so or just use the indicator with a higher "period" parameter.

The original code of mladen takes several minutes longer at the begin of the test of the EA in the strategy tester if "period" is set high

(e.g. 50000).

Thanks Mladen Rakic for this indicator!!! 

Thanks  winloosewin for the indicator. How i wish it was mt5 though.. :)

 
I just want to thank the developer for this. It's the base for a trade system I'm putting together and it's giving me great results so far.
 

Hello, first thank you for sharing. I want to use the Hull class embeded in EA so my question is how to use iHull.calculate to get the values of last two bars. 

val[i] = iHull.calculate(iMA(NULL,0,1,0,MODE_SMA,inpPrice,i), rates_total-i-1, rates_total);

when I replace rates_total with bars like this it is not delivering correct results

      ma1 = iHull.calculate(iMA(NULL,0,1,0,MODE_SMA,MaPrice,1),Bars-2,Bars);
      ma2 = iHull.calculate(iMA(NULL,0,1,0,MODE_SMA,MaPrice,2),Bars-3,Bars-1)
 

Hello !! Thanks for share!!

Please can someone add arrows and mail alert when color cross,  please?

 
please help us to add arrows and mail alert when color cross,  please?
Reason: