Hello I am trying to collect the OHLC values of EUR USD, in realtime. But I see some values are missing as there was a bit of processing what I tried and then again started to collect. See the values:
2018-07-26 11:06:00 1.17268 1.17273 1.17261 1.17264
2018-07-26 11:10:00 1.17258 1.1726 1.17242 1.17242
The values between 11:06:00 and 11:10:00 got missed during the process.
Kindly, help me get those missing values so that the process completes.
Well you can try to reduce the processing if that is an option..
Otherwise you can call:
Where X is the bar.
To get the minute and:
For the other values.
How do I decide the X, as it is not know to me sir? Please guide me.
Zero or 0 is the current bar.
1 is the bar one minute ago.
2 is the bar two minutes ago.
So every time a bar closes all bars shift like +1.
Print("Last bar: "+TimeToString(bar_0,TIME_MINUTES)+" Open: "+DoubleToString(open_0,_Digits));
Print("Previous bar: "+TimeToString(bar_1,TIME_MINUTES)+" Open: "+DoubleToString(open_1,_Digits));
Print("3 bars ago: "+TimeToString(bar_2,TIME_MINUTES)+" Open: "+DoubleToString(open_2,_Digits));
Respected sir, I can understand that the X if nothing but an offset.
But how I can get the value. Say as per my example: 11:06:00 and 11:10:00, so this means that after 11:06:00, there are 3 candles missing. I want to discover it programmatically. The 2018-07-26 11:06:00 figure I am fetching from a file and then want to check it with the latest time. and then Fetch the missing candles.
Sir I do not wish to open files everytime. As there are huge file. Please can you help me with that?
I am not totally sure what is the task can you please describe it bit more clear.
If you have missing candles the function will return 0 or false, NO_DATA
But a download will be initiated.
So when you call for the data once more, it should be present.
Im not sure why or what you want to do with files.
Here is the function description: https://www.mql5.com/en/docs/series/iopen
I understood. I try it.