
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
I guess he was referring to this https://www.mql5.com/en/docs/series/timeseries_access section (???)
Unless I miss something, it's not stated anywhere in this page that SymbolSelect() is not "updated immediately". We are talking here about symbol's properties, not about timeseries.
Thanks, when I run modified code as you recommended, I get different results at different times.
Sometimes for symbols with empty history, SymbolInfoInteger returns true but returned time is zero that means no data is available.
And sometimes for symbols with non-empty history, SymbolInfoInteger returns true and returned time is zero that means no data is available!!!.
I think SymbolSelect has a bug that doesn't updates MarketWatch immediately, so calling functions like SymbolInfoInteger or SymbolInfoTick after SymbolSelect doesn't return correct result(s).
In my first reply, I didn't look carefully what you were doing. There is no bug actually, only your expectation is wrong, symbol's values are not the same as history data.
You just select a symbol and you request "last quote" time, but there is not tick yet, it's not an historical data which could be available, it's a "live" data, so you need to wait a tick for this symbol's property to be set. (same reasoning for a tick with SymbolInfoTick).
If you request some "fixed" symbol's properties (like Digits) there is no problem and the value is immediately available.
There are plenty of functions to know if and what timeseries data are available. See documentation and provided links.