iBars() takes forever - page 2

 
Keith Watford:

If it is normal, then that is not good. I will have to remember to check the returned values and whether to exclude them, especially for the time.

3 times in 1 hours to get M1 data is normal behaviour for MT5 requestion MTF data (data on a different timeframe than the chart timeframe).

Checking the return value of a function is not an option, it's a good practice, unless you know it can't fail.

It's good because it's why MT5 is faster than MT4 (one reason among other). There a lot of asynchronous behaviour with MT5, which means if something is not ready the function returns instead of waiting. There are several ways to deal with it depending of your needs (wait next tick, a loop with Sleep(), a timer...).

It's of course a bit annoying for such a simple thing, it has a good justification.

Reason: