MT4 Strategy tester weirdness

 

Hi

 

Having some odd times with the strategy tester, anyone throw any light on it?

1) My EA has a simple bit of buy code in it, here it is:

ticket=OrderSend(Symbol(),OP_BUY,StakePerPoint,Ask,0,0,0,"Buy Order",MagicNumber,0,Green);

 Now if I run this in the strategy tester say over 2 or 3 days, with the Visual Mode disabled, it does indeed place a few buys here and there based on my trigger conditions.

If I enable Visual mode, the strategy tester seems to run (albeit much more slowly, not sure why that should be guess it has to paint the price bars etc) and using the exact same EA code as above, no orders are placed, and no Green arrows appear on the chart, anyone seen that before?

 

2) The above code that does buys, you can see from the code I've effectively disabled Stop price so the order goes ahead with no stop in place, but when I check the results tab I can see a whole bunch of buy orders (expected) but I also see a bunch of 'close at stop' orders (unexpected/unwanted) in the Type column, why?

3) If I run in visual mode, the green progress bar next to the start button in strategy tester gets to the end (100%) but still looks busy (but I can see from the Journal that it's stop doing stuff since I use Print() a lot to debug), the log file remains locked and I have to quit MT4 so I can open the log file via windows explorer.

 

thanks

IDH 

 

ahhh, I've just noticed that all the stops seem to occur right at the end of the test data, the last tick available which for my data set was 19th April at 9.14pm when the symbol I'm trading is closed for the weekend. If this is the cause, is there a way to stop that from occurring so the positions stay open?

 
idh:

ahhh, I've just noticed that all the stops seem to occur right at the end of the test data, the last tick available which for my data set was 19th April at 9.14pm when the symbol I'm trading is closed for the weekend. If this is the cause, is there a way to stop that from occurring so the positions stay open?

When you run out of data, the tester stops and closes all orders. Nothing you can do about it.
Reason: