Help to upgrade to MetaTrader 5 without loss - page 6

 
Serj74 :
Thank you so much.
The second one is ready, sorry it took so long, I couldn't get to the computer for a week.
Files:
macd-rsi.mq5  7 kb
 
vdv2001 :
The second one is ready, sorry it took so long, I couldn't get to my computer for a week.
Thank you
 

For vdv2001

Maybe I'm too late, but I would still like to ask you to translate these three indicators into MKL 5, two of them made by Rosh. Unfortunately, I'm a complete dummy in programming myself.

Files:
 
In addition, there is a group of indicators for the ASTTREND trading system (may be you remember when it was popular), if you do not refuse, I can send you and them to transfer to MKL 5 (there are 6 indicators, three of the main, and the rest service character)
 
vdv2001:
The second one is ready, sorry it took so long, I couldn't get to my computer for a week.
I probably should have written in the style of a response to the relevant post. If so, please take note of my two previous posts. thanks in advance for your attention
 

  iBarBegin = iBarShift(NULL, 0, dtTimeBegin);
  iBarEnd = iBarShift(NULL, 0, dtTimeEnd);
  dPriceHigh = High[Highest(NULL, 0, MODE_HIGH, iBarBegin-iBarEnd, iBarEnd)];
  dPriceLow = Low [Lowest (NULL, 0, MODE_LOW , iBarBegin-iBarEnd, iBarEnd)];

How do I write this code in MT5?

I found the iBarShift procedure on the forum, but the copyleader swears at the TFMigrate function that it doesn't exist:

int iBarShift(string symbol,
                  int tf,
                  datetime time,
                  bool exact=false)
  {
   if(time<0) return(-1);
   ENUM_TIMEFRAMES timeframe=TFMigrate(tf);
   datetime Arr[],time1;
   CopyTime(symbol,timeframe,0,1,Arr);
   time1=Arr[0];
   if(CopyTime(symbol,timeframe,time,time1,Arr)>0)
     {
      if(ArraySize(Arr)>2) return(ArraySize(Arr)-1);
      if(time<time1) return(1);
      else return(0);
     }
   else return(-1);
  } 

 
eminsk:

  iBarBegin = iBarShift(NULL, 0, dtTimeBegin);
  iBarEnd = iBarShift(NULL, 0, dtTimeEnd);
  dPriceHigh = High[Highest(NULL, 0, MODE_HIGH, iBarBegin-iBarEnd, iBarEnd)];
  dPriceLow = Low [Lowest (NULL, 0, MODE_LOW , iBarBegin-iBarEnd, iBarEnd)];

How do I write this code in MT5?

I found the iBarShift procedure on the forum, but the copyleader swears at the TFMigrate function that it doesn't exist:

int iBarShift(string symbol,
                  int tf,
                  datetime time,
                  bool exact=false)
  {
   if(time<0) return(-1);
   ENUM_TIMEFRAMES timeframe=TFMigrate(tf);
   datetime Arr[],time1;
   CopyTime(symbol,timeframe,0,1,Arr);
   time1=Arr[0];
   if(CopyTime(symbol,timeframe,time,time1,Arr)>0)
     {
      if(ArraySize(Arr)>2) return(ArraySize(Arr)-1);
      if(time<time1) return(1);
      else return(0);
     }
   else return(-1);
  } 

See MQL4 to MQL5 Transition
 

Please rewrite the MultiInstrument indicator or similar for overlaying one instrument chart on another.


 

Very much needed indicators, is it possible to do something similar in mt5?

Files:
ind.rar  3 kb
 

Процедуру iBarShift я нашел на форуме, но копилятор ругается на функцию TFMigrate что она не существует:

ENUM_TIMEFRAMES TFMigrate(int tf){switch(tf) { case 0: return(PERIOD_CURRENT);   case 1: return(PERIOD_M1);      case 5: return(PERIOD_M5);   case 15: return(PERIOD_M15);
                                               case 30: return(PERIOD_M30);      case 60: return(PERIOD_H1);     case 240: return(PERIOD_H4); case 1440: return(PERIOD_D1);
                                               case 10080: return(PERIOD_W1);    case 43200: return(PERIOD_MN1); default: return(PERIOD_CURRENT);}}
there you go.
Reason: