int DeleteSellPendingOrders(int Magic)
{
int total = OrdersTotal();
for (int cnt = total - 1; cnt >= 0; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if
(OrderMagicNumber()==Magic && OrderSymbol()==Symbol() &&
(OrderType()==OP_BUYSTOP || OrderType()==OP_BUYLIMIT || OrderType()==OP_SELLSTOP || OrderType()==OP_SELLLIMIT))
{
OrderDelete(OrderTicket());
}
}
return(0);
}
|