MQL5 strategy tester with Open Prices

 

Hi everyone,


I’m trying to replicate my live trading in the strategy tester. The live trades are taken when the previous bar is completed (i.e when a new bar is formed). I simply check the last bar time at each new tick event to see whether a new bar is present. This works well. The code is also designed to trade multiple symbols by looping through each symbol and doing the new bar check. I’d like to make sure my testing is performed in exactly the same way as in the live environment but utilising the open prices model, which should be adequate and not take as long as using every tick. 

I thought I’d check that the multi symbol EA was working by comparing the results of two symbols - USDCHF & AUDCAD. First of all I ran them individually and then compared the results to the combined multi-symbol run. I was expecting that the sum of the net profit of the individual runs would be exactly the same as when running combined but it’s slightly different. When looking at the deal results I notice that the times when the stop loss is triggered can be slightly different between the individual symbol case and the multi. I think it has something to do with a bar synchronisation between symbols. For example when it should be getting the 12:15:00 bar it says it is the 12:14:47. Has anyone had any experience of this? I’m using open prices on the 15 minute chart  


Any pointers would be much appreciated.


Many thanks,


E

 
EdFuk:

Hi everyone,


I’m trying to replicate my live trading in the strategy tester. The live trades are taken when the previous bar is completed (i.e when a new bar is formed). I simply check the last bar time at each new tick event to see whether a new bar is present. This works well. The code is also designed to trade multiple symbols by looping through each symbol and doing the new bar check. I’d like to make sure my testing is performed in exactly the same way as in the live environment but utilising the open prices model, which should be adequate and not take as long as using every tick. 

I thought I’d check that the multi symbol EA was working by comparing the results of two symbols - USDCHF & AUDCAD. First of all I ran them individually and then compared the results to the combined multi-symbol run. I was expecting that the sum of the net profit of the individual runs would be exactly the same as when running combined but it’s slightly different. When looking at the deal results I notice that the times when the stop loss is triggered can be slightly different between the individual symbol case and the multi. I think it has something to do with a bar synchronisation between symbols. For example when it should be getting the 12:15:00 bar it says it is the 12:14:47. Has anyone had any experience of this? I’m using open prices on the 15 minute chart  


Any pointers would be much appreciated.


Many thanks,


E

Does anyone else run a multi-symbol EA? If so I'd like to hear from you to see whether you have any issues with backtest.


Many thanks


E

Reason: