Multicurrency OPTIMIZATION: different results depending on the pair selected in tab "Settings"

 
The EA code does not fail.
Specific "EURUSD, USDJPY, USDCAD, AUDUSD" as pairs of work and on the "Setup" is selected by default EURUSD: Initial balance $ 5,000; final balance Jan-June 2013 with 0.1 lots, $ 9,700.
The same operation but selecting USDJPY tab: $ 10,700.
Again selecting USDCAD: $ 9,995
If I run each currency separately and add results, is $ 10,700.
Does anyone know why?
 

another example...

separatly       profit  TRADES  Selected
    GBPUSD      1935    141     GBPUSD
    EURUSD      2339    134     EURUSD
    USDJPY      3179    140     USDJPY
   total        7453    415     
                        
together        7622    413     USDJPY
                4450    384     GBPUSD
                5479    359     EURUSD
 
josemiguel1812:

another example...

Check your code
 
The code is checked. No error. Work with OnChartEvent () and not OnTick ()
The effect is to change the option in the optimizer, settings tab, which allows a single pair. In theory this should not influence option if the code defines the working pairs.
 
josemiguel1812:
The code is checked. No error. Work with OnChartEvent () and not OnTick ()
The effect is to change the option in the optimizer, settings tab, which allows a single pair. In theory this should not influence option if the code defines the working pairs.
Which settings ? Sorry but you don't give enough details. Can you post a screenshot of Strategy tester window with your settings ?
 
Attached optimizer images...
Files:
 
josemiguel1812:
Attached optimizer images...

Ok, so you are using an input parameter of your EA to define symbols to trade. If I understand well you don't have the same results when you change the Strategy tester settings from EURUSD to USDJPY or USDCAD, keeping the same parameters on your EA, right ?

The most obvious reason I can see is that your EA isn't independent of the selected symbol (chart).  You can either share your code for someone else check it or write to ServiceDesk to report a bug in the Strategy Tester.

Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
 
angevoyageur:

Ok, so you are using an input parameter of your EA to define symbols to trade. If I understand well you don't have the same results when you change the Strategy tester settings from EURUSD to USDJPY or USDCAD, keeping the same parameters on your EA, right ?

The most obvious reason I can see is that your EA isn't independent of the selected symbol (chart).  You can either share your code for someone else check it or write to ServiceDesk to report a bug in the Strategy Tester.

Thanks, I've sent the query to ServiceDesk
Reason: