one optimization for all currency pairs

 

Hi guys,

How could I see on which pairs my EA performs best? I don't want to click through every currency pair while backtesting. I would like to use optimization (EA would trade different currency pairs depending on external variable subjected to optimization) .

E.g.

if a=1 than ea trades EURUSD

if a=2 than ea trades USDJPY

.

.

.


Do you have any idea?

Thanks for your input :)

 

You can only test on one currency pair at a time in the Strategy Tester. So what you're asking can't be done in the classical (easy) sense anyway. Your only recourse with the standard tools is to test each pair independently.

 

Tovan, Are you sure? Cause, if we could assign a currency pair symbol to a certain number, it could be possible. I tried to code it, but I'm more lame in mql than I thought....

Of course I don't want someone to write the code for me... But a little guidance would be appreciated.

 

extern int symbol_to_use = 0; //0: EURUSD, 1: GBPUSD

string mysymbol = "";

if(symbol_to_use == 0) mysymbol = "EURUSD";

else mysymbol = "GBPUSD";

MarketInfo(mysymbol, MODE_STOPLEVEL); //use mysymbol on every other function

.

Although this would work to access other timeframes, your EA would still be emulated as if it was ticking at every tick of your open chart in the strategy tester -- not the ones you are trying to access. Still much better to do it one at a time and write down the important settings for each pair along with their results. Then compare the results.

.

Jon

 
ziebol1 wrote >>

Tovan, Are you sure? Cause, if we could assign a currency pair symbol to a certain number, it could be possible. I tried to code it, but I'm more lame in mql than I thought....

Of course I don't want someone to write the code for me... But a little guidance would be appreciated.

The concept can work on a live chart, but can't be back tested. When you run the Strategy Tester it will only load history for one currency pair. It will give you an error if you try to call history data from a pair other than the one selected in the setup dialog.

 

Tovan's right.

Could you do your optimization in an Excel model?


CB

 
tovan:

The concept can work on a live chart, but can't be back tested. When you run the Strategy Tester it will only load history for one currency pair. It will give you an error if you try to call history data from a pair other than the one selected in the setup dialog.

Yes, Tovan- you're right. Now I see it. Well it seems I have to click through each currency pair.


cloudbreaker:

Tovan's right.

Could you do your optimization in an Excel model?


CB

I've tried excel optimization. It will be faster and less occupying clicking through the strategy tester.


Thank you guys very much for your advice.

I'm going on vacations :)

CU

Tom

Reason: