HH HL LH LL Indicator for MetaTrader mql

HH HL LH LL Indicator for MetaTrader4 – Download for free

Table of Contents

Are you tired of searching the HH LL HL LH without an automated system? With our HH HL LH LL Indicator for MetaTrader4, you can automate this task.

It makes no sense to invest your time in an action that can easily make an indicator or expert advisor. Better to invest your time to study the market and to test other aspects that an automatic system cannot do.

At the end of this page, you can find and download our HH HL LH LL Indicator for MetaTrader4 for free. We only ask you to follow us on our channels to help us grow. We will also show you the code in MQL for creating the indicator.

Continue reading this article if you want to learn how to use the HH LL HL LH indicator or go directly to the bottom of this page to download.

In this link, you will find other free material and other indicators to download: click here.

What is the HH HL LH LL Indicator

The HH HL LH LL indicator searches the chart for the following price patterns:

  • Higher High
  • Higher Low
  • Lower High
  • Lower Low
HH HL LH LL Indicator for metatrader

Higher High – HH

This pattern occurs whenever a new high is formed on the graph. We can consider this new high when the price has retraced.

HH HL
This image is from www.realfibonaccitrading.com: Link

The HH HL LH LL indicator will automatically draw the higher high. This pattern shows that the uptrend is strong.

It can have Higher High on the same level. Not quite the same level, but a few pips away.

The HH LL HL LH Indicator and the MetaTrader report the pattern even if a few pips exceed the maximum. In fact, in this case, rather than a Higher High, it would be a Double Top because the price rebounded on the same previous high.

For this reason you should ignore the patterns that are on the same level after a few pips

Higher Low – HL

You can spot a Lower High when the price cannot form a new high and goes back. This is a sign of price weakness because it cannot return to previously reached levels.

By combining a Higher High with a Lower High in your MetaTrader, you can draw a trend line that identifies a bearish trend.

Insider Tips: Thanks to the HH LL HL LH indicator, you can more easily identify the differences between prices and an oscillator.

One of the most tedious aspects of divergence-based strategies is precisely the search for the maximums and minimums needed to trace trend-lines.

When the price levels are a few pips apart and the trendline will incline to less than 10%, do not consider the pattern because it is not clear.

Lower Low – LL

The Lower Low occurs at the end of a bearish trend and represents the lowest low of that period.

The HH HL LH LL indicator is programmed to detect Lower Lows automatically. As we explained to you about Higher Highs, when two Lower Lows are practically on the same level, we are in the presence of a double bottom.

Unfortunately, this indicator always requires human control. It is not a problem relating only to the HH HL LH LL indicator; any indicator that claims to identify graphic price patterns will always need further human control.

Higher Low – HL

A Higher Low is formed when the price draws rising lows. We can use this pattern with Lower Low to detect divergences.

As we explained above, all you need to do is draw a bullish trend line by connecting the Lower Low with the High Low.

We repeat the same advice, which is not to consider the divergence when the trend line has an almost horizontal inclination.

How to use the HH HL LH LL Indicator

Like any automatic indicator of graphic patterns, reliability increases when time frames go up. Looking for patterns of this type in an intraday chart will provide many incorrect indications because, in low timeframes, the noise is too high.

In a daily timeframe, the HH LL HL LH Indicator will give you reasonably reliable indications regarding divergences or swings.

How to discover and draw divergences with HH HL LH LL

We mentioned above the use of the HH LL HL LH indicator to identify divergences.

The divergences are graphic formations that signal a reversal of the trend.

To find a divergence, you will need to choose an oscillator; we recommend the Relative Strength Index RSI Indicator.

Using the HH LL HL LH Indicator, you will draw trend lines by connecting Higher Highs with Lower Highs and Lower Lows with Higher Lows.

indicator HH LL HL LH in metatrader

You will also draw trend lines on the RSI indicator. When you have a bullish trend line on the price and a bearish trendline on the RSI indicator, you have identified a divergence.

The divergence is signaling you that the price could lose strength and reverse its trend.

We have created a straightforward method to detect divergences automatically: read here.

Channel breakout using the HH LL HL LH Indicator

As we have seen, one function we like most about this indicator is that it facilitates the drawing of trend lines.

By connecting multiple HL or LH you will draw price channels that will give bullish or bearish signals when they are broken.

how to use HH LL HL LH indicator for channel breakout

One of the biggest problems for a new trader is to identify these graphic formations objectively.

Unfortunately, two traders with the same skills could identify different LH or HL on the same chart.

The HH LL HL LH indicator, therefore, makes it possible to make the graph more aim than reading.

How to code with MQL

#property copyright "Copyright Finance Strategy System"
#property link      "https://financestrategysystem.com/"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red

extern int ExtDepth=12;
extern int ExtDeviation=1;
extern int ExtBackstep=1;
extern color LabelColor1 = Aqua;
extern color LabelColor2 = Magenta ;
extern int Labeldistance = 2;

double ZigzagBuffer[];
double HighMapBuffer[];
double LowMapBuffer[];
int level=3;  
bool downloadhistory=false;

int PipFactor = 1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   
   if (Digits == 3 || Digits == 5)
   {
      PipFactor = 10;
   }
   ObjectsDeleteAll(0,OBJ_TEXT);
   IndicatorBuffers(3);

   SetIndexStyle(0,DRAW_SECTION);

   SetIndexBuffer(0,ZigzagBuffer);
   SetIndexBuffer(1,HighMapBuffer);
   SetIndexBuffer(2,LowMapBuffer);
   SetIndexEmptyValue(0,0.0);


   IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");

   return(0);
  }
  
  int deinit()
  {
    ObjectsDeleteAll(0,OBJ_TEXT);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int i, counted_bars = IndicatorCounted();
   int limit,counterZ,whatlookfor;
   int shift,back,lasthighpos,lastlowpos;
   double val,res;
   double curlow,curhigh,lasthigh,lastlow;

   if (counted_bars==0 && downloadhistory) 
     {
      ArrayInitialize(ZigzagBuffer,0.0);
      ArrayInitialize(HighMapBuffer,0.0);
      ArrayInitialize(LowMapBuffer,0.0);
     }
   if (counted_bars==0) 
     {
      limit=Bars-ExtDepth;
      downloadhistory=true;
     }
   if (counted_bars>0) 
     {
      while (counterZ<level && i<100)
        {
         res=ZigzagBuffer[i];
         if (res!=0) counterZ++;
         i++;
        }
      i--;
      limit=i;
      if (LowMapBuffer[i]!=0) 
        {
         curlow=LowMapBuffer[i];
         whatlookfor=1;
        }
      else
        {
         curhigh=HighMapBuffer[i];
         whatlookfor=-1;
        }
      for (i=limit-1;i>=0;i--)  
        {
         ZigzagBuffer[i]=0.0;  
         LowMapBuffer[i]=0.0;
         HighMapBuffer[i]=0.0;
        }
     }
      
   for(shift=limit; shift>=0; shift--)
     {
      val=Low[iLowest(NULL,0,MODE_LOW,ExtDepth,shift)];
      if(val==lastlow) val=0.0;
      else 
        { 
         lastlow=val; 
         if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=LowMapBuffer[shift+back];
               if((res!=0)&&(res>val)) LowMapBuffer[shift+back]=0.0; 
              }
           }
        } 
      if (Low[shift]==val) LowMapBuffer[shift]=val; else LowMapBuffer[shift]=0.0;
      //--- high
      val=High[iHighest(NULL,0,MODE_HIGH,ExtDepth,shift)];
      if(val==lasthigh) val=0.0;
      else 
        {
         lasthigh=val;
         if((val-High[shift])>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=HighMapBuffer[shift+back];
               if((res!=0)&&(res<val)) HighMapBuffer[shift+back]=0.0; 
              } 
           }
        }
      if (High[shift]==val) HighMapBuffer[shift]=val; else HighMapBuffer[shift]=0.0;
     }

   
   if (whatlookfor==0)
     {
      lastlow=0;
      lasthigh=0;  
     }
   else
     {
      lastlow=curlow;
      lasthigh=curhigh;
     }
   for (shift=limit;shift>=0;shift--)
     {
      res=0.0;
      switch(whatlookfor)
        {
         case 0: 
            if (lastlow==0 && lasthigh==0)
              {
               if (HighMapBuffer[shift]!=0)
                 {
                  lasthigh=High[shift];
                  lasthighpos=shift;
                  whatlookfor=-1;
                  ZigzagBuffer[shift]=lasthigh;
                  DrawHighLabel(shift);
                  res=1;
                 }
               if (LowMapBuffer[shift]!=0)
                 {
                  lastlow=Low[shift];
                  lastlowpos=shift;
                  whatlookfor=1;
                  ZigzagBuffer[shift]=lastlow;
                  DrawLowLabel(shift);
                  res=1;
                 }
              }
             break;  
         case 1: 
            if (LowMapBuffer[shift]!=0.0 && LowMapBuffer[shift]<lastlow && HighMapBuffer[shift]==0.0)
              {
               ZigzagBuffer[lastlowpos]=0.0;
               RemoveLabel(lastlowpos);
               lastlowpos=shift;
               lastlow=LowMapBuffer[shift];
               ZigzagBuffer[shift]=lastlow;
               DrawLowLabel(shift);
               res=1;
              }
            if (HighMapBuffer[shift]!=0.0 && LowMapBuffer[shift]==0.0)
              {
               lasthigh=HighMapBuffer[shift];
               lasthighpos=shift;
               ZigzagBuffer[shift]=lasthigh;
               DrawHighLabel(shift);
               whatlookfor=-1;
               res=1;
              }   
            break;               
         case -1: 
            if (HighMapBuffer[shift]!=0.0 && HighMapBuffer[shift]>lasthigh && LowMapBuffer[shift]==0.0)
              {
               ZigzagBuffer[lasthighpos]=0.0;
               RemoveLabel(lasthighpos);
               lasthighpos=shift;
               lasthigh=HighMapBuffer[shift];
               ZigzagBuffer[shift]=lasthigh;
               DrawHighLabel(shift);
               res=1;
              }
            if (LowMapBuffer[shift]!=0.0 && HighMapBuffer[shift]==0.0)
              {
               lastlow=LowMapBuffer[shift];
               lastlowpos=shift;
               ZigzagBuffer[shift]=lastlow;
               DrawLowLabel(shift);
               whatlookfor=1;
               res=1;
              }   
            break;               
         default: return; 
        }
     }

   return(0);
  }
  
void DrawHighLabel(int shift)
{
   string status = "";
   
   double currentHigh = HighMapBuffer[shift];
   double previousHigh;
   // find the previous high
   for (int i=shift+1; i<shift+1000; i++)
   {
      if (HighMapBuffer[i] != 0 && ZigzagBuffer[i] != 0)
      {
         previousHigh = HighMapBuffer[i];
         break;
      }
   }
   if (currentHigh > previousHigh)
   {
      status = "HH  ";
  
   
   }
   else
   {
      status = "LH  ";
   }
   double position = HighMapBuffer[shift] + (Labeldistance * Point * PipFactor);
   ObjectCreate( "statusLabel"+Time[shift], OBJ_TEXT, 0, Time[shift], position);
   ObjectSetText("statusLabel"+Time[shift], status, 10, "Arial", LabelColor1);
}

void DrawLowLabel(int shift)
{
    
   string status = "";
   double currentLow = LowMapBuffer[shift];
   double previousLow;
  
   for (int i=shift+1; i<shift+1000; i++)
   {
      if (LowMapBuffer[i] != 0 && ZigzagBuffer[i] != 0)
      {
         previousLow = LowMapBuffer[i];
         break;
      }
   }
   if (currentLow > previousLow)
   {
      status = "HL  " ;
   
   
   }
   else
   {
      status = "LL  ";
   }
   double position = LowMapBuffer[shift] - (Labeldistance/2 * Point * PipFactor);
   ObjectCreate( "statusLabel"+Time[shift], OBJ_TEXT, 0, Time[shift], position);
   ObjectSetText("statusLabel"+Time[shift], status, 10, "Arial", LabelColor2);
   
}


void RemoveLabel(int shift)
{
   ObjectDelete("statusLabel"+Time[shift]);
}
//+------------------------------------------------------------------+

How to install the indicator in the MetaTrader

To install the indicator in the MetaTrader, click the link at the end of this page. Help us grow by following us on our channels and download the indicator for free.

Once the HH_LL_HL_LH.ex4 file has been downloaded, drag it to the MQL4 / Indicators folder. Launch the MetaTrader and drag it onto the chart.

The HH LL HL LH indicator works on all time frames, but as we have said, it is much more reliable on higher time frames.

Conclusions

The HH LL HL LH Indicator is a useful tool for every trader. It will allow you to easily identify graphic formations such as Higher High (HH), Higher Low (HL), Lower Low (LL) and Lower High (LH).

It allows you to more easily identify and draw trend lines for divergence-based strategies or a channel breakout.

However, it will always be necessary to adopt a minimum of control and not to consider all those patterns that are not very clear graphically.

Ultimately, this indicator should be used in a discretionary way.

HH LL HL LH Indicator download

DOWNLOAD BUTTON

ABOUT US

logo homepage finance strategy system
finance strategy system about us
error: Alert: Content is protected !!