How does Close[0] index its values?

 

I am creating an EA where it checks the Close[0] to either buy/close/sell. My question is because bar 0 is not fully formed yet, is the Close[0] considered as the ask/bid? Or is it only considered a Close once the bar has completed. I need to know because if it is only considered a close once the bar is complete will my ea work properly?

I have checked the documentation but it does not answer my question.

Any clarity will be greatly appreciated. 

https://book.mql4.com/variables/arrays

An example of the code is below.

double Open0 = Open[0];

double Close0 = Close[0];

if(Open0>Close0){
OrderSend(Symbol(),OP_BUY,0.1,Ask,10,0,0,"Prototype H4",Magix,0,clrAliceBlue);
}
Arrays - Variables - MQL4 Tutorial
Arrays - Variables - MQL4 Tutorial
  • book.mql4.com
Arrays - Variables - MQL4 Tutorial
 
Rahul Shaji Parmeshwar: is the Close[0] considered as the ask/bid? O
  1. Charts are bid prices.
  2. Close[0] is the last received bid price and is the close price if no more ticks are received during that bar.
Reason: