How to access and backtest all pairs from single EA ?

To add comments, please log in or register
fiestafalcon
1553
fiestafalcon  

Dear All,

 

I would like to monitor and tarde all major and cross pairs in single EA.

Is it possible to do backtesting in such case  (for exp, if EURUSD is bearish, i would like to short EURGBP by also taking into account some EURUSD and EURGBP indicator values)? 

Is there a code sample for accessing all major and cross pairs for such EA development, could share a code sample link pls ?

 

Thx for support, good day.

Sergey Golubev
Moderator
106044
Sergey Golubev  

Creating a Multi-Currency Multi-System Expert Advisor 


Just imagine your a single EA trades simultaneously on several dozens of trading strategies, on all of the available instruments, and on all of the possible time frames!  In addition, the EA is easily tested in the tester, and for all of the strategies, included in its composition, has one or several working systems of money management.

So, here are the main tasks that we will need to solve:

  1. The EA needs to trade on the basis of several trading systems at the same time. In addition, it must equally easily trade on a single, as well as on multiple trading systems;
  2. All of the trading system, implemented in the EA, must not conflict with each other. Each trading system must handle only it own contribution to the total net position, and only its own orders;
  3. Each system should be equally easy to trade with on a single time-frame of the instrument, as well as on all time-frames at once.
  4. Each systems should be equally easy to trade with on a single trading instrument, as well as on all of the available instruments at once.
Sergey Golubev
Moderator
106044
Sergey Golubev  

The Implementation of a Multi-currency Mode in MetaTrader 5 


Currently, there are a large number of developed multi-currency trading systems, indicators, and Expert Advisors. Nevertheless, the developers continue to face the specific problems of multi-currency systems development.

With the release of the MetaTrader 5 client terminal and the MQL5 programming language, we gained a new opportunity to implement a full fledged multi-currency mode and, consequently, more efficient multi-currency robots and indicators. These new opportunities will be the topic of this article.

Marco vd Heijden
Moderator
8154
Marco vd Heijden  

Hello you can use mostly the same code just add a loop over the desired instruments like this:

   for(int i=0;i<SymbolsTotal(1);i++)
     {
      Print(SymbolName(i,1));
      // Do something...
     }
fiestafalcon
1553
fiestafalcon  
Thx a lot for your comments.
To add comments, please log in or register