Function iTime or iBarShift returns the wrong value first

 

Hi,

when I open my metatrader account and use the following functions on my ea:

iTime(Symbol(), PERIOD_D1,0)

or

iBarShift(Symbol(), PERIOD_M1, TimeTemp,true)


I get sometimes on the first call a different result as in the second call (on tick after).

Does anybody realized the same?


Should I call this functions once in my init() function to avoid this function.

 
Check for error 4066, if you get it, wait or try again . . .
Reason: