Indicators: Hull moving average (ema based)

 

Hull moving average (ema based):

Hull moving average (ema based)

Hull moving average (ema based)

Author: Mladen Rakic

 

Thanks for the code. I use you code to learn how to use mt4/mt5 code.

I noticed:

double price = iMA(NULL,0,1,0,MODE_SMA,inpPrice,i);

Why is MODE_SMA used if you are trying to use Exponential MA?
Would  MODE_EMA not be more suited for what you want to achieve?

I see MODE_SMA in all your Hull MA code by the way.

 
Automated-Trading:

Hull moving average (ema based):

Author: Mladen Rakic

Hi Mladen

Pretty thanks for inventing and addition one more Average "Hema" - Hull (ema) moving average in the Hull variations,your innovative ideas will never end,a kind of infinite creativity - :)

And yes,it handle the over shooting display in a fine way,the white/magenta colored is Hema and blue/brown the usual HMA (both periods 55) in example picture

1

 
hrhsii:

Thanks for the code. I use you code to learn how to use mt4/mt5 code.

I noticed:

Why is MODE_SMA used if you are trying to use Exponential MA?
Would  MODE_EMA not be more suited for what you want to achieve?

I see MODE_SMA in all your Hull MA code by the way.

That has nothing to do with the ema calculation - see period 1 used

That is the fastest way in metatrader 4 to get a desired price (it is faster than using switches - measured long time ago and it is still valid)

Check the rest of the code and you shall find where the actual ema is calculated (I do not use built in functions for that)
 

Hi Mladen

do you also have a mt5 version of this one?

Thank you.

 

Hello, Mladen,

I was told this couldn't be done - so I thought immediately of you:

your new HMA (EMA) could be a good example to transform into one indicator (+ histo) in which the

a) signal line reflects current TF (for example H1 - entry/exit)
b) while histo reflects higher TF (for example H4 - directional bias)
As an example (screenshot) I give you a combination of HMA + histo (both are yours, I think)
This could be done for:
HMA
Stoch
MACD etc
What do you think? Interested?
(And, of course, colour change on slope direction change will always be especially appreciated as it gives best signals)

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
  • www.mql5.com
Some technical indicators have several buffers drawn in the chart. Numbering of indicator buffers starts with 0. When copying indicator values using the CopyBuffer() function into an array of the double type, for some indicators one may indicate the identifier of a copied buffer instead of its number.
Files:
US100H1.png  28 kb
US100H1.jpg  61 kb
 
FloMi:

Hi Mladen

do you also have a mt5 version of this one?

Thank you.

I second that request, if Mladen has some little time in his hands a version of this for mt5 would be great. Thanks in advance for him.
 
Hi Mladen, I also thank you for all the great work you do.  Fantastic.  I have done Jim Hodge's course but am still learning to code in MQL4, unfortunately I haven't yet reached the stage of fully understanding your code.  I have written an EA calling buffers 0 and 3 of your Hull moving average as a trigger, but finding some lag on up/down slope.  I would be very appreciative if you could tell me which buffer to use to detect the colour change as soon as it occurs.  Thank you in anticipation.
 

Hello, Mladen,

it is amazing indicator 

if you add a notifications like sound alert and Push Alerts it will be perfect

 

Hello, Mladen,

if we add this code can it send alerts when color change ( buy or sell)


input int    
input bool   EnableNativeAlerts = true;
input bool   EnableSoundAlerts  = true;
input bool   EnableEmailAlerts  = true;
input bool   EnablePushAlerts  = true;
input string AlertEmailSubject  = "";
input string AlertText  = "";
input string SoundFileName = "alert.wav";
 
datetime LastAlertTime = D'01.01.1970';
int LastAlertDirection = 0;
Files:
imge.jpg  38 kb
 

Hi Mladen,

I am a novice programmer and I use your works both for my trading and as a mean to learn how to properly code.

Keep up the great work

Thanks a bunch

Reason: