0 returned for the iTime function - page 3

 
Fsarno:

What is the recommended technique to use these functions for different time frames and currency pairs in an EA attached to a single chart? Do I have to open up a chart for all of currency pairs and time frame combinations I wish to access? I was hoping to update the local history data within the EA without having to create a chart for each combination.

Usually only commercial developers would go to all the trouble of coding to manage 15 pairs and multi timeframes at the same time from one EA because there is no accepted technique for doing that and it takes a lot of work to figure it out. So don't expect a whole bunch of developers are going to share their commercial level coding logic on a public forum.

It is more efficient for a trader writing his own EA to attach it to 15 charts in a matter of a minute or two.

 
GumRai: So it took just over a second and history now exists where it didn't before
The Pre 600 documentation said when you get the History Will be Updated error code, you should wait 15 seconds and then retry once. You do not get that error code again.
 
WHRoeder:
The Pre 600 documentation said when you get the History Will be Updated error code, you should wait 15 seconds and then retry once. You do not get that error code again.

The code that I posted was only intended to show that the history will be updated while the EA is "sleeping"

In response to this

Fsarno:

The problem is that there isn't history data for the currency pairs and time frames that I am using the "I" functions for. (This is why iTime returned 0) The sleep function won't produce or update these local files.


 
Thanks all for your review of this. I finally got what I needed. I can use ChartSetSymbolPeriod and/or PostMessageA to manage the local history in the way that I need. The stumbling block for me was not understanding how the local history is created and updated. I have only been looking at EAs and MQL for two weeks, and it took longer than I expected to grasp some fundamentals.
 
Take me months though.
Reason: