The OrdersTotal == 1 while I have no orders...

 

This is the problem in the backtesting tool, the normal EA running has no problem though.

The version of MT4 is build 432.

 
The backtesting in visual mode has no problem, it only happens when visual mode is not ticked.
 
nickyip:

This is the problem in the backtesting tool, the normal EA running has no problem though.

The version of MT4 is build 432.


Just do

Refresh() .

 
crossy:


Just do

Refresh() .

There is no such function, and if you mean RefreshRates() how would that help from within the Strategy tester ?
 
nickyip:
The backtesting in visual mode has no problem, it only happens when visual mode is not ticked.
The most likely answer is that you code has an issue. It's hard to help more specifically without seeing any of your relevant code.
 
RaptorUK:
There is no such function, and if you mean RefreshRates() how would that help from within the Strategy tester ?


You right about the correct form, but it can solve the problem.
 
nickyip:

This is the problem in the backtesting tool, the normal EA running has no problem though.

The version of MT4 is build 432.

Looks like some bug in code. The possible case that looks to me - you are not recalculating open-order count after closing all orders in a function/loop.