i need help converting this mt4 indicator to mt5.

 

can someone please give me some information, or even help me out on this?

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property indicator chart_window
#property indicator buffers 2
#property indicator color1 Lime
#property indicator color2 Red
#define  SH BUY   1
#define  SH SELL  -1
//---- Входные параметры
extern int     AllBars=0;//How many bars should be counted. 0 - all the bars.
extern int     Otstup=17;//Step back.
extern int     SigSize=3;//Step back.
extern double  Per=13;//Period.
extern int Symbol_Sign=159;
extern string  Alert_Setting="Alert Setting";
extern bool   EnableAlert=true;
extern bool   PushAlert=true;
extern bool    SoundAlert=true;
extern string   SoundFilename="alert.wav";

string nm;
int            SH,NB,i,UD,x=0,y=0,a=0,b=0;
double         R,SHMax,SHMin;
double         BufD[];
double         BufU[];
//+------------------------------------------------------------------+
//| Функция инициализации                                            |
//+------------------------------------------------------------------+
int OnInit()
  {
   ObjectsDeleteAll();
//We will write the number of the bars for which we are counting to the NB
   if(Bars<AllBars+Per || AllBars==0)
      NB=Bars-Per;
   else
      NB=AllBars;
   IndicatorBuffers(2);
   IndicatorShortName("Wave_Dots");
//SetIndexStyle(0,DRAW_ARROW,0,SigSize);
//SetIndexStyle(1,DRAW_ARROW,0,SigSize);
//SetIndexArrow(0,Symbol_Sign);
//SetIndexArrow(1,Symbol_Sign);
   SetIndexBuffer(0,BufU);
   SetIndexBuffer(1,BufD);
//SetIndexDrawBegin(0,Bars-NB);//This indicator will be shown for NB bar only
//SetIndexDrawBegin(1,Bars-NB);
//ArrayInitialize(BufD,0.0);//Give a lot of "zero" to the buffe. Otherwise it will be garbage during the changing of time frame.
//ArrayInitialize(BufU,0.0);
   return INIT SUCCEEDED;
  }
//+------------------------------------------------------------------+
//| Собсна индикатор                                                 |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,       // размер входных таймсерий
                const int prev_calculated,  // обработано баров на предыдущем вызове
                const datetime &time[],     // Time
                const double &open[],       // Open
                const double &high[],       // High
                const double &low[],        // Low
                const double &close[],      // Close
                const long &tick_volume[],  // Tick Volume
                const long &volume[],       // Real Volume
                const int &spread[]         // Spread
               )
  {
   int CB=IndicatorCounted();
   /* It is the optimization option. We have the function here which restore/return the number of counted bars in very special way.
      During the first indicator's call we have 0: it is normal because it was not counted anything,
      and then we receive the number of bars minus 1. For example, if the number of bars equal 100,
      we will have 99. I did it especially, you may see that NB is the number of bars whioch should be counted.
      You know we may throw out this parameter. But for the people who understand we may keep it. So, during the first call
      of indicator this NB is the same one but during the 2dn etc calls - reducing the value up to the last bar,
      That is 1 or 2 for example*/
   if(CB<0)
      return (-1);
   else
      if(NB>Bars-CB)
         NB=Bars-CB;
   for(SH=1; SH<MathMax(NB,2); SH++) //comb out the chart from 1 to NB
     {
      for(R=0,i=SH; i<SH+10; i++)
        {
         R+=(10+SH-i)*(High[i]-Low[i]);
        }
      R/=55;
      SHMax = High[Highest(NULL,0,MODE HIGH,Per,SH)];
      SHMin = Low[Lowest(NULL,0,MODE LOW,Per,SH)];
      if(Close[SH]>SHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH BUY)
        {
         BufD[SH]=High[SH]+R*0.5;
         nm=DoubleToStr(Time[SH], 0);
         if(ObjectFind(nm)<0)
           {
            ObjectCreate(nm, OBJ ARROW, 0, 0,0);
            ObjectSet(nm, OBJPROP_TIME1, Time[SH]);
            ObjectSet(nm, OBJPROP_PRICE1, BufD[SH]);
            ObjectSet(nm, OBJPROP ARROWCODE, 242);
            ObjectSet(nm, OBJPROP COLOR, clrRed);
            ObjectSet(nm, OBJPROP WIDTH, 3);
           }
         if(Close[SH]>SHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH BUY)
            UD=SH BUY;
         if(Close[SH]>SHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH BUY)
            y=0;//x=x+1;
        }
      else
         if(Close[SH]<SHMin+(SHMax-SHMin)*Otstup/100 && UD!=SH SELL)
           {
            BufU[SH]=Low[SH]-R*0.5;
            nm=DoubleToStr(Time[SH], 0);
            if(ObjectFind(nm)<0)
              {
               ObjectCreate(nm, OBJ ARROW, 0, 0,0);
               ObjectSet(nm, OBJPROP_TIME1, Time[SH]);
               ObjectSet(nm, OBJPROP_PRICE1, BufU[SH]);
               ObjectSet(nm, OBJPROP ARROWCODE, 241);
               ObjectSet(nm, OBJPROP indicator color3 clrLime
                         ObjectSet(nm, OBJPROP WIDTH, 3);
              }
            if(Close[SH]<SHMin+(SHMax-SHMin)*Otstup/100 && UD!=SH SELL)
               UD=SH SELL;
            if(Close[SH]<SHMin+(SHMax-SHMin)*Otstup/100 && UD!=SH SELL)
               x=0;//y=y+1;
           }
     }
   string n=_Symbol;
   datetime time0=iTime(n,0,0);
   static int next=0;
   static datetime tm_bar=0;
   if(tm_bar==0)
      tm_bar=time0;
   if(time0!=tm_bar)
     {
      next=0;
      tm_bar=time0;
     }
   string text="";
   if(BufU[1]!=EMPTY VALUE)
     {
      if(next!=1)
        {
         text=StringFormat("%s %s BUY - UP DIRECTION",TimeToString(TimeCurrent(),TIME MINUTES),n);
         if(EnableAlert)
            Alert(text);
         if(PushAlert)
            SendNotification(text);
         if(SoundAlert)
            PlaySound(SoundFilename);
         next=1;
        }
     }
   if(BufD[1]!=EMPTY VALUE)
     {
      if(next!=-1)
        {
         text=StringFormat("%s %s SELL - DOWN DIRECTION",TimeToString(TimeCurrent(),TIME MINUTES),n);
         if(EnableAlert)
            Alert(text);
         if(PushAlert)
            SendNotification(text);
         if(SoundAlert)
            PlaySound(SoundFilename);
         next=-1;
        }
     }
   return(0);
  }
//+------------------------------------------------------------------+
 
Is this indicator in CodeBase?
 
Vladimir Karputov:
Is this indicator in CodeBase?

i am not sure ! im realy new in this converting thing,... it is a indicator from mt4 that i realy realy want to have in my mt5 system


ill attach the file in here so you can check if you want

Files:
Reason: