I have written a simple expert adviser program with Simple Moving Average with period 8 (i.e., SMA(8)) and timeframe 1 Min.
Mqlrates mqrate, mqrate.close,mqrate.close is giving me the current and previous candle's open,high,low and close price values. But, when I try to access the current candle's close price, it is giving me the close price of the incomplete current candle (i.e., the intermediate close price value of current candle forming). I am getting correct open, high,low and close values for previous candles as they were completely formed. Can anyone suggest a way to access the close price after current candle formed completely.
after it closed it will shift from zero to one.
So zero is always open... if it was not you could look into the future at what price it was going to close..
Your basically looking for a never existing value.
If you want the close price as soon as it becomes available you can compare the candles time and wait for it to change, once it changed you know there was a shift.