Hull Moving Average Indicator For MT5

Hull Moving Average Indicator For MT5

Table Of Contents:

  1. Hull Moving Average Indicator For MT5
  2. Installing the Hull Moving Average Indicator For MT5
  3. Parameters of the Hull Moving Average Indicator For MT5
  4. Buffers of the Hull Moving Average Indicator For MT5
  5. Main Parts Of The Code

The Hull Moving Average Indicator For MT5 is a great technical trading indicator to have as a trader because it aids traders to better evaluate the market activity and conditions of almost any trade-able financial asset - it is based on a well known trend-based oscillator known as the Hull Moving Average indicator - this indicator has proven to be a top class moving average indicator because of its highly relevant in-screen formations. This modified version of the initial Hull Moving Average indicator has a great feature that allows traders to control the speed element of the moving average. The default setting of the Hull power variable is set to one - when it is set to one it simply means that it is one hundred in-sync with the normal Hull Moving Average however any other setting differs it from the standard Hull moving average. The Hull power may either be less than one or greater than zero so if it is to set to be less than one then trader it is actually slowing it down and making it less responsive and sensitive to the market activity but when it is set to greater than one then it means that the trader is essentially speeding up the indicator or increasing its sensitivity and responsiveness to market activity.

FREE Hull Moving Average Indicator

Download the FREE Hull Moving Average Indicator for MT5.

To receive my email 100% sure: 
Put my email on your whitelist!

 

Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

 

Installing the Hull Moving Average Indicator For MT5

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file hull_.mq5 into the folder MQL5\Indicators of your MT5 installation. After that please restart MT5 and then you will be able to see the indicator in the list of indicators.

Parameters of the Hull Moving Average Indicator For MT5

The Hull Moving Average Indicator For MT5 has 3 parameters to configure.

input double   HmaLength =   14;     // Hull period input double   HmaPower  =    1;     // Hull power input enPrices Price     = pr_close; // Price 

Buffers of the Hull Moving Average Indicator For MT5

The Hull Moving Average Indicator For MT5 provides 2 buffers.

SetIndexBuffer(0,hull    ,INDICATOR_DATA); SetIndexBuffer(1,colorInd,INDICATOR_COLOR_INDEX); 

Main Parts Of The Code

int OnCalculate(const int rates_total,                 const int prev_calculated,                 const datetime& time[],                 const double& open[],                 const double& high[],                 const double& low[],                 const double& close[],                 const long& tick_volume[],                 const long& volume[],                 const int& spread[]) {    //    //    //    //    //        int HalfPeriod = (int)MathFloor(HmaLength/2);    int HullPeriod = (int)MathFloor(MathSqrt(HmaLength));    for (int i=(int)MathMax(prev_calculated-1,1); i lt rates_total; i++)    {       double price       = getPrice(Price,open,close,high,low,rates_total,i);              hull[i]     = iLwmp(2.0*iLwmp(price,HalfPeriod,HmaPower,rates_total,i,0)-iLwmp(price,HmaLength,HmaPower,rates_total,i,1),HullPeriod,HmaPower,rates_total,i,2);              colorInd[i] = colorInd[i-1];                if (hull[i] gt hull[i-1]) colorInd[i] = 0;                if (hull[i] lt hull[i-1]) colorInd[i] = 1;    }    return(rates_total); }   //------------------------------------------------------------------ //                                                                   //------------------------------------------------------------------ // // // // //  double getPrice(enPrices price, const double& open[], const double& close[], const double& high[], const double& low[], int bars, int i) {    switch (price)    {       case pr_close:     return(close[i]);       case pr_open:      return(open[i]);       case pr_high:      return(high[i]);       case pr_low:       return(low[i]);       case pr_median:    return((high[i]+low[i])/2.0);       case pr_typical:   return((high[i]+low[i]+close[i])/3.0);       case pr_weighted:  return((high[i]+low[i]+close[i]+close[i])/4.0);       case pr_average:   return((high[i]+low[i]+close[i]+open[i])/4.0);    }    return(0); }  //------------------------------------------------------------------ //                                                                  //------------------------------------------------------------------ // // // // //  double workLwmp[][3]; double iLwmp(double price, double period, double power, int bars, int r, int instanceNo=0) {    if (ArrayRange(workLwmp,0)!= bars) ArrayResize(workLwmp,bars);        //    //    //    //    //        workLwmp[r][instanceNo] = price;       double sumw = MathPow(period,power);       double sum  = sumw*price;       for(int k=1; k lt period && (r-k) gt =0; k++)       {          double weight = period-k;                 sumw  += MathPow(weight,power);                 sum   += MathPow(weight,power)*workLwmp[r-k][instanceNo];         }                 return(sum/sumw); } 

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group


Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.