MT5 Strategy Tester doesn't work with multiple pairs

Maska55
122

I created an EA in MT5 and I tested it with Strategy Tester. It must trade with multiple currency pairs in parallel, but the strategy tester doesn't work properly, because it doesn't trigger neither "Take Profit"-s nor "Stop Loss"-es. Please check the following screenshot. Red color means Sell trade SL and TP, blue color means Buy trade SL and TP.


MT5 version is build 2981 21Jun2021
William Roeder
25873
William Roeder  
It does work properly; it is your code.
Maska55
122
Maska55  
@William Roeder or also maybe somebody else, it would be very much appreciated if you add here multicurrency EA that is working properly with Strategy Tester (it would be easier if it works with default indicators, e.g Moving Average) 
Alain Verleyen
42596
Maska55:
@William Roeder or also maybe somebody else, it would be very much appreciated if you add here multicurrency EA that is working properly with Strategy Tester (it would be easier if it works with default indicators, e.g Moving Average) 

What is the problem ? Your explanation are unclear.

MT5 strategy tester works without problem with multisymbols EA.

Maska55
122
Maska55  
Alain Verleyen #:

What is the problem ? Your explanation are unclear.

MT5 strategy tester works without problem with multisymbols EA.

I will try to explain it a little bit more precisely. The problem is that SL/TP-s are not triggered when testing multicurrency EA using "Open prices only" modelling. I will describe the problem in step-by-step tutorial, maybe it helps you to identify the problem:

1) Please find from attachment a very simple MA based EA (it takes trades in every MA cross), after that move the file into MT5 Experts folder and/or you can test with your own EA

2) Please run the test with following parameters


3) Please observe during the simulation how SL/TP-s are triggered in Strategy visualization window (you will notice that they are not triggered at all) e.g EURGBP currency pair (this problem is not related with certain currency pair, you can check also some other pair)


4) Check the Balance / Equity graph - at the end it will drop to zero, because all orders are getting stop-out's, and that is explainable because TP/SL-s are not triggered, total amount of losses are bigger than equity and that's why all orders get Stop-out's.


In conclusion testing multicurrency EA using "Open prices only" modelling is not working properly, because TP/SL-s are not triggered. It is working if you use other type of modelling, e.g "Every tick" modelling.


Hopefully it is now described in better way, but feel free to ask any questions.

<ex5 file removed>

Alain Verleyen
42596

You need to post mql5 file on this forum, ex5 are not allowed.

Sorry but unless you can provide the code I will not invest any time on this.

Maska55
122
Maska55  
Alain Verleyen #:

You need to post mql5 file on this forum, ex5 are not allowed.

Sorry but unless you can provide the code I will not invest any time on this.

I am sorry, did not know that! The code is generated by a tool, I added mql5 the file as an attachment.

Files:
MA.mq5  400 kb
Enrique Dangeroux
821
Enrique Dangeroux  
Maska55 #:

I am sorry, did not know that! The code is generated by a tool, I added mql5 the file as an attachment.

The problem is in the tool you are using. That needs fixing, no point in fixing the code.

Maska55
122
Maska55  
Enrique Dangeroux #:

The problem is in the tool you are using. That needs fixing, no point in fixing the code.

Thank you for sharing your ideas! Can you provide also some example multiple currency EA that I can use for testing purposes and get confirmation that the issue is with the code and not with the MT5 platform? It would very much appreciated!