OrdersTotal() Query!!

 

When I write:

OrdersTotal()==0 at EA

this mean that no orders are open for this symbol or for All symbols?

and if it is for all symbols how can i specify it for the symbol which I run the EA on it??

 
OrdersTotal() is for All symbols. If you want a particular symbol the ask if(OrderSymbol()=="EURUSD") <=== After the OrderSelect().
 
int count=0;
for(int iPos = OrdersTotal()-1; iPos >= 0; iPos--) if( 
        OrderSelect(iPos, SELECT_BY_POS)                // Only my orders w/
    &&  OrderMagicNumber()  == Magic.Number             // my magic number
    &&  OrderSymbol()       == chart.symbol             // and my pair.
    ){ count++; }
if (count == 0) at EA
 
Thank you ;)
Reason: