compilewไม่ผ่าน"return' - expressions are not allowed on a global scope" ไม่รู้แก้ยังไงครับ
int CountOrder(int type){
int CntOrder=0;
for(int i= 0 ;<OrdersTotal();i++;
OrderSelect(i,SELECT_BY_POS,MODE_TRADE);
if(OrderType()== type && OrderMagicNumber() == MagicNumber){
if(OrderSymbol() == Symbol()){
CntOrder++;
}
}
}
return(CntOrder);