tikky20: "How do I know when the historical data becomes up-to-date?" Is there some kind of synchronous wait function or any other notification to know when the data is safe and current for usage?
Indicators will get a new zero IndicatorCounted() so they will auto update.
EA don't look before Bars (iBars) Once history updates so will iBars.
The data is always safe - just check!
Hello WHRoeder,
Thank you for the quick ideas!
iBars worked like a charm. I used the following solution in my script:
while( iBars(symbol, PERIOD_D1) <= 0 )
{
Sleep( 50 );
}
And yes, the data is really always safe and consistent.
Thanks again!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello All,
My question is the following:
Suppose a script calls a built-in indicator for multiple symbols on a given time frame. The charts for these symbol-time frame pairs were not opened or otherwise refreshed recently. So at first call to the indicator the corresponding historical data are out of date, but this first "touch" on them seems to trigger the downloading of the missing portion of historical data.
The question is "How do I know when the historical data becomes up-to-date?" Is there some kind of synchronous wait function or any other notification to know when the data is safe and current for usage?
Thanks and looking forward to your response.