what i would like is that open orders are ordered automaticly in different groups.
at the moment i have this code and it works for 1 group but i want to have different groups.
however this makes 1 group.
what i would like is an EA to group orders under different conditions.
so EA checks which orders are open.
group 1 = open buy orders in +
group 2 = open buy orders in -
group 3 = open sell orders in +
group 4 = open sell orders in -
so when i add a new order manually. an EA will arrange for me the order in groups.
This is what i try to accomplish. if anybody can help me shine some light over this problem. would be greatly appriciated.
at the moment i have this code and it works for 1 group but i want to have different groups.
Inserted Code
int TotalorderCount(string argsymbol,int argMagicNumer) {int OrderCount; for(Counter = 0; counter <= OrdersTotal()-1; Counter++) {orderSelect(Counter,SELECT_BY_POS); if(OrderMagicNumber() == argMagicNumer && OrderSymbol() == argSymbol) { OrderCount++' } } return(OrderCount); }
however this makes 1 group.
what i would like is an EA to group orders under different conditions.
so EA checks which orders are open.
group 1 = open buy orders in +
group 2 = open buy orders in -
group 3 = open sell orders in +
group 4 = open sell orders in -
so when i add a new order manually. an EA will arrange for me the order in groups.
This is what i try to accomplish. if anybody can help me shine some light over this problem. would be greatly appriciated.