Tester Symbol Count is always 1

 
Screenshot


Hey, when I test my EA with more than one symbol still the symbol count is only one.

When this one will be incremented when I add more symbols to my test

Here's my code

string symbolList[2] = {"EURUSD","USDJPY"};

bool isTradeAllowed = true;

int OnInit(){
   return(INIT_SUCCEEDED);
}

void OnTick(){
   if(isTradeAllowed){
      PlaceBuyOrder(symbolList[0]);
      PlaceBuyOrder(symbolList[1]);
      isTradeAllowed = false;
   }
}

void PlaceBuyOrder(string currentSymbol){
   double ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
   trade.Buy(lotSize,currentSymbol,ask);

Also when I visualize this test. Only selected symbol in the tester is showing and calculating. The other pair is not getting calculated.

How to test multi symbols without using All Market Watch Symbol Option

Is there a way to do it?

 
  1. You are not showing the code the prints out the symbol count you mention so we have no ideia how you are calculating it.
  2. When optimizing over all symbols, the EA is run against each symbol individually as the current symbol.
    So the EA should trade the current symbol only and not a predefined list of symbols set by you in the EA's parameters.
  3. If your EA trades multiple symbols from a list, then there is no use in optimising it against ALL symbols from the Market Watch. That only makes sense for single-symbol EAs, not multi-symbol EAs.

Please also read the following thread:

Forum on trading, automated trading systems and testing trading strategies

MT5 Strategy Tester (all market watch symbols)

Fernando Carreiro, 2022.11.12 20:35

That is because when you select "all market watch symbols" you are not optimising parameters, but in fact running a single test against each symbol, with the same parameters for all of them.

In other words, you are optimising to see which symbol offers the best results for the exact same parameters for all of them.

To truely optimise for multiple symbols, you have to code your EA to be multi-symbol and make the symbol selection be part of the parameters.


 
Fernando Carreiro #:
  1. You are not showing the code the prints out the symbol count you mention so we have no ideia how you are calculating it.
  2. When optimizing over all symbols, the EA is run again each symbol individually as the current symbol.
    So the EA should trade the current symbol only and not a predefined list of symbols set by you in the EA's parameters.
  3. If your EA trades multiple symbols from a list, then there is no use in optimising it against ALL symbols from the Market Watch. That only makes sense for single-symbol EAs, not multi-symbol EAs.

Please also read the following thread:


Can you please give a sample code for multi symbol EA just to place orders for example..

 
nithinpiratez #: Can you please give a sample code for multi symbol EA just to place orders for example..

Here are two examples by different programmers from the CodeBase, but you should do your own research.

Code Base

Multi Arbitration 1.1xx

Vladimir Karputov, 2017.11.03 11:31

Buy a security (open BUY positions) at a lower price, sell (open SELL positions) at a higher price.

Code Base

Multi-currency night scalper - Night Scalper Multi

Andrey Kornishkin, 2017.01.18 09:24

Night scalper, trades until 0 am terminal time within a narrow range.
 
Fernando Carreiro #:

Here are two examples by different programmers from the CodeBase, but you should do your own research.

Thank you!

 
nithinpiratez #: Thank you!

You are welcome!

Reason: