Curious if anyone else has experienced these problems in Build 226 Strategy Tester:
1) The open order stack just disappears
I don't know what u mean by 'disappears'... Your code has a bug though, it should be:
orderCount=OrdersTotal(); for(x=orderCount-1; x>=0; x--)
2) iTime() returns unpredictable data
What is the value of 'currPair'? Are u sure it's the currently tested symbol? (u can't access iTime() data for other symbols in the Tester).
I don't know what u mean by 'disappears'... Your code has a bug though, it should be:
What is the value of 'currPair'? Are u sure it's the currently tested symbol? (u can't access iTime() data for other symbols in the Tester).
Gordon,
The orderCount+1 vs. orderCount-1 was something I tried and didn't revert back before posting. As coded it's really not a bug, just an inefficiency. Anyway, the results are the same: Not all currently active orders are found in the loop.
This same logic loop is running successfully in live EAs, or it was before this weekend, and has never given me problems. Variable currPair is populated by function Symbol() at EA initialization. It may be a little old school, but in most of the languages I've dealt with over the last 30 year accessing memory is typically faster than a function call. Maybe that's not true in this case...
It's kind of interesting because I put this EA up on a demo account last night with a live data feed and things are working as expected. The problem seems to only exist in Strategy Tester, any thoughts?
[...] Not all currently active orders are found in the loop [...] The problem seems to only exist in Strategy Tester, any thoughts?
I am pretty sure it's a problem with your code (although I can't find the problem in your sample, check the rest of your code or post it here)... This part of the platform is proven to work reliably.
2 comments:
- Take a look at the limitations of the Tester here -> https://www.mql5.com/en/articles/1512. Perhaps you will find something u missed.
- There is an issue related to selecting orders from the history pool in Live/Demo (although this doesn't seem to be your problem)... Have a look here -> https://www.mql5.com/en/forum/124193.
I am pretty sure it's a problem with your code (although I can't find the problem in your sample, check the rest of your code or post it here)... This part of the platform is proven to work reliably.
2 comments:
- Take a look at the limitations of the Tester here -> https://www.mql5.com/en/articles/1512. Perhaps you will find something u missed.
- There is an issue related to selecting orders from the history pool in Live/Demo (although this doesn't seem to be your problem)... Have a look here -> https://www.mql5.com/en/forum/124193.
Both great suggestions, thank you. I will be reading these tonight.
Now for the fun part. The problem has disappeared. Thinking back I do remember having issues with Strategy Tester on another Sunday night and when I came back to it on Monday night everything was hunky dory. Didn't change anything and never did figure out what it may have been. That time I didn't post anything on the Forum because I wanted to dig in a little first. This time I applied the service pack for Build 226 on Sunday afternoon and just assumed the issue was related to the new build. I guess the old adage: never assume it makes an @$$ out of u and me applies in this case (at least it seems to apply to me...).
Sorry for wasting your time and thank you again for the suggested readings. Have a great evening.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Curious if anyone else has experienced these problems in Build 226 Strategy Tester:
1) The open order stack just disappears
2) iTime() returns unpredictable data
Any thoughts would be greatly appreciated.