what's wrong here (orderselect) New comment trader201 2011.01.31 16:09 I'm tring to use orderclose/ordermodify. I think before use that, I need to use orderselect. I have this code: if (condition1) { OrderSend(OP_BUY...) } for(int i=OrdersTotal();i>0;) // this is for select order if there are orders opened { OrderSelect(OrdersTotal(), SELECT_BY_POS,MODE_TRADES); } if (condition2) { OrderClose(...) } What's wrong in this code? Thanks a lot trader201 what's wrong here? (close and delet several opened and pending orders ) [Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. How to select by pos and compare 2 orders at a time? How to make a OrderSelect loop? Ricky 2011.01.31 16:51 #1 for(int i=orderstotal(); i>0; i--) --> orderselect(i, select_blablabla) iv_danko 2011.02.01 13:18 #2 It will be right: for(int i=orderstotal()-1; i>=0; i--) --> orderselect(i, select_blablabla) New comment
I'm tring to use orderclose/ordermodify. I think before use that, I need to use orderselect. I have this code:
if (condition1)
{OrderSend(OP_BUY...)
}
for(int i=OrdersTotal();i>0;) // this is for select order if there are orders opened
{
OrderSelect(OrdersTotal(), SELECT_BY_POS,MODE_TRADES);
}
if (condition2)
{
OrderClose(...)
}
What's wrong in this code?
Thanks a lot
trader201