Download MetaTrader 5

How can count Ordersymbol() ?

To add comments, please log in or register
Are you a good trader? Become a signals provider and make even more money!
Wassapon Palaung
247
Wassapon Palaung 2016.05.24 07:38 

I want count  Ordersymbol().

 

How can write it ?

 This count only order.

 Example :

BUY : EURUSD 2 order

SELL : GBPUSD 1 order

SELL : USDJPY  1 order

Count Ordersymbol = 3

int CountSym()
   {
   int count=0;
   int i,mm;
   int total=OrdersTotal();
   for(i=0;i<total;i++)
   {
   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
 
    if (OrderSymbol() != Symbol()) continue;
   
   count++;
   
   }
   return(count);
   }
To add comments, please log in or register