Open multiple trades, One per pair. (I can't figure out how to code it)

 

Currently, I have been using this code...

//-------------------------------------------------------------------

int TotalOrdersCount()

{

  int result=0;

  for(int i=0;i<OrdersTotal();i++)

  {

     OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

     if (OrderMagicNumber()==MagicNumber) result++;

//------------------------------------------------------------------

it has worked fine, all I do is switch magic numbers for each currency pair. But I'm improving my EAs but I don't know how to write it.

I want my EA to open different trades on different pairs, but only one per pair. How do I do it?

 

There is no ordersend in your code.

If you want to open orders on different pairs you can use SymbolName(pos,1)

 
this isn't my entire code Marco, it's just the portion that regulates how many trades are placed at a time...
 

Maybe it's a good idea to post all code.

This code only increments result whenever a magic number match appears.

If you want your EA to trade multiple pairs (again) you can use SymbolName(pos,1)