Help convert some part of mq4 to mq5

 

Can anyone help me to convert some parts of this indicator MQ4 to MQ5?


Please only this part


//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
   int myBars=0, StartBar=0;
   int shift=0, shift1=0, shift2=0, shift3=0;
   bool BullEngulf=False, MorningStar=False, BullPierce=False, Hammer=False,Name=false,Arrow=false;
   bool BearEngulf=False, EveningStar=False, DarkCloud=False, Shooter=False,Name1=false,Arrow1=false;
   bool BullHarami=False, BearHarami=false, BullCross=false, BearCross=false,up=false,down=false;
   int limit=0,n=0,a=0,b=0,x=0,doji=false;
   double  l[1000],h[1000];
   ArrayInitialize(l,0);
   ArrayInitialize(h,0);

   int p3[100],x1[100];
   p3[1]=0;
   if(myBars!=Bars)
     {
      myBars=Bars;
     }
   limit=step;
   for(shift=limit; shift>=0; shift--)
     {
      
      shift1=shift+1;
      shift2=shift+2;
      shift3=shift+3;


      if((iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift)>iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift1)) &&
         (iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift1)>iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift2)) &&
         (iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift2)>iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift3)))
         up=true;
      else
         up=false;
      if((iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift)<iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift1)) &&
         (iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift1)<iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift2)) &&
         (iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift2)<iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,shift3)))
         down=true;
      else
         down=false;

     
      if(5==Period())
        {
         a=15;
         b=5;
        }
      if(15==Period())
        {
         a=7;
         b=3;
        }
      if(60==Period())
        {
         a=25;
         b=15;
        }
      if(240==Period())
        {
         a=30;
         b=20;
        }
      if(1440==Period())
        {
         a=35;
         b=25;
        }