EA will not run on multiple pairs, need help - page 5

 
Matt_Townsend: So should I not have a Continue or Break in the loop at all?
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true) break;
      if(OrderMagicNumber()==MagicNumber || OrderSymbol()==Symbol()) continue;
Irrelevant. You've missed the point completely.
  1. I gave you a form with none.
  2. Keith Watford gave you a correct version with, and you used it.
  3. Now you broke it again. If you select any order, you exit the loop and do nothing.
    Now you broke it again. Think about your if condition.
    OrderMagicNumber MagicNumber OrderSymbol Symbol if(OrderMagicNumber()==MagicNumber || OrderSymbol()==Symbol())
    1 123 EURUSD EURUSD True order rejected (symbols match)
    123 123 EURUSD EURUSD True order rejected (MN match)
    123 123 EURJPY EURUSD True order rejected (MN match)
    1 123 EURJPY EURUSD False order accepted (wrong MN and wrong symbol)




























 

I gave you an example of a loop to count trades and you have ignored it.

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


This will only be true if there are no open orders, it is not a loop.
 
There also isn't an index equal to OrdersTotal(), since numbering starts from 0.