Mql4, Time[0] occure Array out of range error

 



What can be the reason of this cannot refresh history, 4073, and the EA have no acsess to the Time[0] from OnTick() function?

For the many years and a lot of EAs created I have never meet this error before, when array out of range at Time[0].

Also, I have read this post, about that how to catch this error before it occure: https://www.mql5.com/en/forum/188001#comment_4762736

Does it meant that every MT4 EA must to have something like this?


Who have more knowledges about this bug, and how to avoid it?

Download history in MQL4 EA - Help me find out how to download data in MQL4; This chart indicator starts to paint itself on the history of other Time
Download history in MQL4 EA - Help me find out how to download data in MQL4; This chart indicator starts to paint itself on the history of other Time
  • 2017.03.23
  • www.mql5.com
You wrote: but shouldn't it be: as this way the indicator starts to paint itself on the history of the chart as soon as the history has arrived. I am in the m30 chart and i want to wait for the data of this symbol to be downloaded for the h4 time frame and then used correctly
 

Download_history and 4066/4073 errors are irrelevant. Time[0] is the current chart, not some other symbol/TF.

Connect to your broker.

 
William Roeder #:

Download_history and 4066/4073 errors are irrelevant. Time[0] is the current chart, not some other symbol/TF.

Connect to your broker.

But if Time[0] was called from OnTick function, this mean there was a connection, and this mean at least one last zero index bar must be available at the chart, isn't it?
This why I'm asking how array out of range can happened with Time[0] from OnTick()?