What is used on [0]?

To add comments, please log in or register
Matt
77
Matt  
In functions that reference the bar, just what is used on [0]?
For example, what is Close[0]? I would expect it is the current price (bid?). However, my EA isn't behaving that way, so maybe it's something else?
Another example, the MA function iMA(.....,0) where that '0' refers to the current bar. If the MA is using closing price to calculate the value of the MA, what is it using for the current (0) bar? Close? What if it's using some other method?
Open, High, and Low seem to have clear definitions for a current bar, but Close just seems to be troublesome. To me it would be obvious to be current price (as if it were to close this instant) but my confidence in that assumption is threatened by bad EA behaviour.

Thanks for the help.
-matt
Matt
77
Matt  
Another way to ask it,

Why would Close[0] be different from iClose(NULL,0,0)?
I haven't tracked it down, but I get different behavior from EA when I switched from former to latter.
Slava
Moderator
10916
Slava  
Sample of code please to reproduce problem
To add comments, please log in or register