I have looked through several Expert Advisors on the forum with the word “multicurrency” in their names.
No one of them could be optimized for several currencies in one optimization run.
I had to invent …
extern int idxSymbols; string arrSymbols[3]; string currSymbol; OnInit () { ... arrSymbols[0]="AUDNZD"; arrSymbols[1]="EURUSD"; arrSymbols[2]="GBPUSD"; // Вариант 1 - классический : текущий символ = символу из настроек тестера currSymbol=Symbol(); // Вариант 2 - оптимизация : текущий символ = элементу массива, индекс которого перебирается как input параметр при оптимизации currSymbol=arrSymbols[idxSymbols]; // ... }
Simulation: Opening prices only
Testing each pair separately by the first variant, net profit:
AUDNZD – 4180,96
EURUSD – 8674,95
GBPUSD – 1686,79
Optimization by the second variant : The Parameters tab goes through idxSymbols from 0 to 2 inclusive, with the GBPUSD symbol in the tester settings
That’s right. But ….
Changed the symbol for EURUSD in the tester settings: I changed profit on GBPUSD [Pass 2]
Changed the symbol for AUDNZD in the tester settings: I got wrong profits on EURUSD [pass 1] and GBPUSD [pass 2]
What is it ? Help … please … very please 🙁
UPD Cleaning the cache didn’t help