
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
All of a sudden an EA that I have used for several months started to misbehave. I narrowed it down to HistoryDealsTotal(). As a simplified example, here is my OnTester() function:
Since the dealCount is returned, we can see it on the test report.
The first time I run a test after having restarted MT5 or recompiled the code, it works correctly. We can see in the report that the OnTester Result matches the expected number of deals (plus one for the initial balance).
The log file after this successful run looks like this:
But if I now re-run the same test, I get exactly the same trades, but HistoryDealsTotal() doesn't find any deals except the one for initial balance, which means that the OnTester result is now 1.
The log looks like this:
The code has been the same for months, but today was the first time I encountered this issue.
Any ideas what it could be or what could be done about it?