What is mrate[0].close value a the very begining of the current bar ?

 

Hi there,

Can someone give me a clear view on the folllowing ?.

 MqlRates mrate[];

///--- copying data of the last 3 bars
  if(CopyRates(_Symbol,_Period,0,3,mrate)<0)
{
Alert("Historical quote copy error - error: ",GetLastError(),"!!");
return;

Bar_time[0]=mrate[0].time;
//--- if both time values are equal, there is no new bar
if(Prev_time==Bar_time[0]) return;

 //--- new bar

Prev_time=Bar_time[0]; 

 

//--- do something here then with mrate[0].close 

 

At this stage of the code execution what is in mrate[0].close ? (I mean the current bar is never closed, no ?)

Thank you for your comments ! 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / History Data Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / History Data Structure - Documentation on MQL5
 

mrate[0].close show the last price in the chart even the current bar isn't closed yet..
 
Ok, thanks for your comment.
Reason: