Period_Extreme Indicator For MT5

Period_Extreme Indicator For MT5

The Period_Extreme Indicator For MT5 draws some important parameters in the price chart. When you spot a green dot, it shows the maximum price pointer based on the previous candles. On the contrary, when you spot a red pointer it shows the minimum price pointer. But you will not always get red and green dots in the price chart since the indicator also calculates the critical trading zone. Learn more about the support and resistance level so that you can make a decent profit from this market.

FREE Period_Extreme Indicator

Download the FREE Period_Extreme 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

My Recommended MT4/MT5 Broker

 

Installing the Period_Extreme 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 Period_Extreme.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 Period_Extreme Indicator For MT5

The Period_Extreme Indicator For MT5 has 1 parameters to configure.

input uint     InpPeriod   =  1;    // Period

Buffers of the Period_Extreme Indicator For MT5

The Period_Extreme Indicator For MT5 provides 2 buffers.

SetIndexBuffer(0,BufferUP,INDICATOR_DATA);
SetIndexBuffer(1,BufferDN,INDICATOR_DATA);

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[])
  {
//--- #AB0= gt 2:0  lt 0AA82 gt 2 1CD5@ gt 2 :0: B09 lt A5@89
   ArraySetAsSeries(high,true);
   ArraySetAsSeries(low,true);
   ArraySetAsSeries(close,true);
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
   if(rates_total lt fmax(period+1,4))
      return 0;
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
   int limit=rates_total-prev_calculated;
   if(limit gt 1)
     {
      limit=rates_total-period-2;
      ArrayInitialize(BufferUP,EMPTY_VALUE);
      ArrayInitialize(BufferDN,EMPTY_VALUE);
     }

//---  0AGQB 8=48:0B gt @0
   for(int i=limit; i gt =0 && !IsStopped(); i--)
     {
      int bl=Lowest(period+1,i+1);
      int bh=Highest(period+1,i+1);
      if(bl==WRONG_VALUE || bh==WRONG_VALUE)
         continue;
      
      double min=low[bl];
      double max=high[bh];
      
      BufferUP[i]=EMPTY_VALUE;
      BufferDN[i]=EMPTY_VALUE;

      if(close[i] gt max)
         BufferUP[i]=max;
      else if(close[i] lt min)
         BufferDN[i]=min;
     }

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
//|  gt 72@0I05B 8=45:A  lt 0:A8 lt 0;L= gt 3 gt  7=0G5=8O B09 lt A5@88 High          |
//+------------------------------------------------------------------+
int Highest(const int count,const int start)
  {
   double array[];
   ArraySetAsSeries(array,true);
   return(CopyHigh(Symbol(),PERIOD_CURRENT,start,count,array)==count ? ArrayMaximum(array)+start : WRONG_VALUE);
  }
//+------------------------------------------------------------------+
//|  gt 72@0I05B 8=45:A  lt 8=8 lt 0;L= gt 3 gt  7=0G5=8O B09 lt A5@88 Low            |
//+------------------------------------------------------------------+
int Lowest(const int count,const int start)
  {
   double array[];
   ArraySetAsSeries(array,true);
   return(CopyLow(Symbol(),PERIOD_CURRENT,start,count,array)==count ? ArrayMinimum(array)+start : WRONG_VALUE);
   return WRONG_VALUE;
  }
//+------------------------------------------------------------------+

 

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.