iOpen

 

Hello Guys

 

i decided to move from MQL4 to MQL5 , i have a small question

how can i have the below example in MQL5? 

              double Body=((iOpen(NULL,PERIOD_W1,1)-iClose(NULL,PERIOD_W1,1))/Point);

 

could you please introduce me a book fro MQL5? 

 
mostafalotfi:

Hello Guys

 

i decided to move from MQL4 to MQL5 , i have a small question

how can i have the below example in MQL5? 

 

could you please introduce me a book fro MQL5? 

See this article https://www.mql5.com/en/articles/81

Migrating from MQL4 to MQL5
Migrating from MQL4 to MQL5
  • 2010.05.17
  • Sergey Pavlov
  • www.mql5.com
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
 

Hi Guys

 

may i ask you to help me with iOpen?

double iOpenMQL4(string symbol,int tf,int index)

{   
   if(index < 0) return(-1);
   double Arr[];
   ENUM_TIMEFRAMES timeframe=TFMigrate(tf);
   if(CopyOpen(symbol,timeframe, index, 1, Arr)>0) 
        return(Arr[0]);
   else return(-1);
}

 i cannot understand how can i use it :(

 
mostafalotfi:

Hi Guys

 

may i ask you to help me with iOpen?

 i cannot understand how can i use it :(

Sorry but I cannot understand what's your problem ? iOpenMQL4 is a function, you have to call it with the required parameters.
 
angevoyageur:
Sorry but I cannot understand what's your problem ? iOpenMQL4 is a function, you have to call it with the required parameters.
Hi , thanks i got it :D
Reason: