删除挂单
函数执行删除挂单。过滤条件:货币对、订单识别码、挂单类型。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_SELLSTOP || OrderType()==OP_SELLLIMIT))
{
OrderDelete(OrderTicket());
}
}
return(0);
}
学习了,谢谢分享、、、 前排支持下分享
页:
[1]