MQL4 - automated forex trading   /  

Forum

iTime problem

Back to topics list To post a new topic, please log in or register

avatar
7
danielpasono 2006.07.08 06:29 
Hi all.

I've having a problem with iTime returning 0 most of the time. Sometimes it works, but usually it will simply return 0.
The help page says it will return 0 if the local history is empty (not loaded). My History Center for the pair I'm using the strategy tester for says I have history in all time frames.

The code looks like this:
cnt = 0;
while (TimeHour(iTime(ThisPair, PERIOD_H1, cnt)) != midnightET)
{ cnt++;
}

where midnightET is an int with a value of 4 and cnt is also an int. ThisPair is a string that contains the name I'm currently trading (the return value from Symbol())
Any ideas would be great. I'm totally stumped.

Thanks.
Daniel

article

Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Cont.)

In this article, the author gives an example Expert Advisor meeting the requirements stated in the Rules of the Automated Trading Championship 2008


avatar
Moderator
5089
stringo 2006.07.10 11:06 
Back to topics list  

To add comments, please log in or register