Please, I need the help of every one. I am currently writting an EA, during which
set of multiple pending orders will be placed. I also needs to delete these multiple
pending orders if some other conditions are met before the pending orders are taken.
Please, how do I do so. ZECCO - potential professional forex trader.
- [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4.
- Script to place multiple orders
- opening multiple orders
Try this...
void ClosePendingOrders() { for (int i = OrdersTotal() - 1; i >= 0; i--) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol()==Symbol() && OrderMagicNumber() == MagicNumber) { if (OrderType()==OP_SELLSTOP || OrderType()==OP_SELLLIMIT || OrderType()==OP_BUYSTOP || OrderType()==OP_BUYLIMIT) OrderDelete(OrderTicket()); } } } }
If you don't use magic numbers delete { && OrderMagicNumber () == MagicNumber }
zecco:
Please, I need the help of every one. I am currently writting an EA, during which set of multiple pending orders will be placed. I also needs to delete these multiple pending orders if some other conditions are met before the pending orders are taken. Please, how do I do so. ZECCO - potential professional forex trader.
Please, I need the help of every one. I am currently writting an EA, during which set of multiple pending orders will be placed. I also needs to delete these multiple pending orders if some other conditions are met before the pending orders are taken. Please, how do I do so. ZECCO - potential professional forex trader.
Thanks Superion, It's working but not under all scenerio, perharps, its' from my end. I will keep trying
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