OrdersTotal() for specific currency pair

 
I have this comment in an EA. Comment=(" maxOrdersOpen = ",OrdersTotal()). The result is that it appears on all charts with total orders for all working pairs. What do I need to do to make it Currency Pair specific?

Thanks in advance,

Wackena
 
You need to count orders in the orders loop
string symbol=Symbol();
int    orders_cnt=0;
int    total=OrdersTotal();
for(int i=0; i<total; i++)
{
    if(OrderSelect(i)==false) continue;
    if(OrderSymbol()==symbol) orders_cnt++;
}
 
Slawa,

Thank you very much for your help.

Wackena