for(int x=OrdersTotal()-1;x>=0;x--) { if(!OrderSelect(x,SELECT_BY_POS,MODE_TRADES)) continue; if(OrderSymbol()!=Symbol()) continue; if(OrderType()==OP_BUY || OrderType()==OP_SELL) if(!OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3,CLR_NONE)){ Alert("fail deleting trade order"); } }Ok
Nguyen Nga:
Ok
Thank you
Ok
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
This delete all orders, I want delete of symbol ()
for(int x=OrdersTotal()-1;x>=0;x--)
{
if(!OrderSelect(x,SELECT_BY_POS,MODE_TRADES)) continue;
if(OrderType()==OP_BUY || OrderType()==OP_SELL)
if(!OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3,CLR_NONE)){ Alert("fail deleting trade order"); }
}
Thank you