int buyorder=0;
int sellorder=0;
int allorder=0;
for(int i=0;i<=OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol() && OrderType()==OP_BUY)
{
buyorder++;
}
if(OrderSymbol()==Symbol() && OrderType()==OP_SELL)
{
sellorder++;
}
}
allorder=buyorder+sellorder;
Print("Sellorder=",sellorder);
Print("Buyorder=",buyorder);
Print("Allorder=",allorder);