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.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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