Hello,
as the title say. I need a function/event to check, if a chart (means a defined count of candles) is completely loaded and my calculations are valid. The CheckLoadHistory-Function, as described here: https://www.mql5.com/en/docs/series/timeseries_access is not usable, because indicators doesn't care about the sleep-command in that function.
I have already searched a lot, but have not found an answer. Is there one and would anyone like to share it? Thanks in advance for this.
Maybe it helps:
![Documentation on MQL5: Timeseries and Indicators Access / BarsCalculated Documentation on MQL5: Timeseries and Indicators Access / BarsCalculated](https://c.mql5.com/36/63/documentation-on-mql5-timeseries__1.png)
- www.mql5.com
Unfortunately, this does not help.
Sleep(50);
is used there as well.
I wonder if there is an official solution for this. Surely not only I can have this problem.
Adapt that code so that it does not dependant on "sleep", but is instead driven by the events.
For example, rely on the fact that OnCalculate is called on every tick, and use that as a asynchronous delay and use a state machine to keep track of things.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
as the title say. I need a function/event to check, if a chart (means a defined count of candles) is completely loaded and my calculations are valid. The CheckLoadHistory-Function, as described here: https://www.mql5.com/en/docs/series/timeseries_access is not usable, because indicators doesn't care about the sleep-command in that function.
I have already searched a lot, but have not found an answer. Is there one and would anyone like to share it? Thanks in advance for this.