Limited strategy tester.

 

Good day. traders, I am telling you because I have encountered a difficulty when it comes to backtesting and/or optimization. Maybe it could be due to the limitation of MQ5 if that was the case.

Here below you have a backtesting of a bot that I did multicurrency with data from IC-Markets.

in which it was carried out in the period of 2010-2020.

with the symbols EURUSD, GBPUSD, AUDUSD, EURGBP, EURCHF.


(photo with a curve that I consider fine)


The problem starts when I do the same backtesting with a different broker, same pairs, same time frame, same configuration.


(photo with completely different curve.)


I understand that the prices, spread, candle formation, slippage, are different for each broker.

But in order to optimize a bot that works in all brokers, it occurred to me to download the prices of other brokers and make custom symbols, and combine them in a single broker, so it would look like this.

So the problem I have found is that now double operations are done, as it should be, because the symbol is duplicated.

My question is if there is or is there any way to backtest and/or optimize multiple symbols and multiple brokers via MT5.

This learning curve is reaching its limit.

 
Manuel Arturo Gonzales Espinosa:My question is if there is or is there any way to backtest and/or optimize multiple symbols and multiple brokers via MT5.
  1. Please remove the screenshots of the equity curve. They are not needed for your query and could be considered self-advertising and the moderators may end up deleting the thread.
  2. No, there is no way to optimise against different brokers. What you can do is create many Custom Symbols of the other brokers data, and then you can test against the various different Custom Symbols.
 
Fernando Carreiro #:
  1. Please remove the screenshots of the equity curve. They are not needed for your query and could be considered self-advertising and the moderators may end up deleting the thread.
  2. No, there is no way to optimise against different brokers. What you can do is create many Custom Symbols of the other brokers data, and then you can test against the various different Custom Symbols.

And how could you avoid the duplication of operations? The final result can in some cases be double, and in some brokers, there are more operations than in others.

thanks for answering.

 
Manuel Arturo Gonzales Espinosa #: And how could you avoid the duplication of operations? The final result can in some cases be double, and in some brokers, there are more operations than in others.

thanks for answering.

If I am understanding your query properly then the "doubling" may be due to not testing with the proper sets (I'm guessing).

For example, if your EA trades EUR/USD and USD/JPY, then assuming the following Custom Symbols:

  • Set 0: EURUSD, USDJPY (the current broker)
  • Set 1: Broker1.EURUSD, Broker1.USDJPY
  • Set 2: Broker2.EURUSD, Broker2.USDJPY
  • Set 3: Broker3.EURUSD, Broker3.USDJPY

You would then have in your EA the following input parameter "Set" which would be optimised from 0 to 3.

The EA would then only trade the symbols as defined by the "Set" and not any other symbol. If you don't do this, the EA could end up trading all the symbols and mixing up the brokers.

That is probably what is causing the "doubling" or great extra number of trades.

Please note, that I am only guessing here, because I don't know what you are actually doing in your EA and tests.

 
Manuel Arturo Gonzales Espinosa #: ..., and in some brokers, there are more operations than in others.

Now assuming you are doing "sets" as I explained in the previous post, then if you still have a very large discrepancy in trades, then that comes down to the following:

  • It is either the inherent way the strategy works that causes the discrepancy in the number of trades due to data differences (such as using grids or martingale), or ...
  • ... there could be a potential bug in the EA.
 
Fernando Carreiro #:

Si estoy entendiendo su consulta correctamente, entonces la "duplicación" puede deberse a que no se realizó la prueba con los conjuntos adecuados (supongo).

Por ejemplo, si su EA opera EUR/USD y USD/JPY, entonces asumiendo los siguientessímbolos personalizados:

  • Conjunto 0: EURUSD, USDJPY (el corredor actual)
  • Conjunto 1: Broker1.EURUSD, Broker1.USDJPY
  • Conjunto 2: Broker2.EURUSD, Broker2.USDJPY
  • Conjunto 3: Broker3.EURUSD, Broker3.USDJPY

A continuación, tendría en su EA el siguiente parámetro de entrada "Set" que se optimizaría de 0 a 3.

El EA solo intercambiaría los símbolos definidos por el "Set" y no cualquier otro símbolo. Si no hace esto, el EA podría terminar intercambiando todos los símbolos y mezclando a los corredores.

Eso es probablemente lo que está causando la "duplicación" o gran número extra de operaciones.

Tenga en cuenta que solo estoy adivinando aquí, porque no sé lo que realmente está haciendo en su EA y pruebas.

yes, the duplication of operations is due to the fact that I mix all the symbols of the brokers (as you can see in the photo that I attach in the "symbols" section), but when using your recommendation it would only be optimized for 1 broker of the 3 sets . Or am I misunderstanding?

And no, there is no problem in code or bug.

thanks for following the thread.

 
Manuel Arturo Gonzales Espinosa #: yes, the duplication of operations is due to the fact that I mix all the symbols of the brokers (as you can see in the photo that I attach in the "symbols" section), but when using your recommendation it would only be optimized for 1 broker of the 3 sets . Or am I misunderstanding? And no, there is no problem in code or bug. thanks for following the thread.

No, it will be optimising for all the brokers but without mixing the symbols between brokers. Given that the selection of which "Set"/broker to use is a parameter, that parameter value would be part of the optimisation.

So, in the end you would see which broker offered the best performance and which parameters would work best for that broker.

If you then exported the results to a spreadsheet, you could then also filter and organise the data any way you wished, such as for example filtering by "Set" or broker and seeing the best results and parameters for each broker,

Reason: