//
[attach]12379[/attach]
by MetaTrade 2508964628
int nCurTradeOpen = 0;
for (int i = OrdersTotal() - 1; i >= 0; i --) {
OrderSelect(i , SELECT_BY_POS, MODE_TRADES);
if (OrderType() = 0; j--) {
OrderSelect(j, SELECT_BY_POS, MODE_TRADES);
if (OrderType() > OP_SELL)
{
if (OrderOpenTime() != Time[0])
{
OrderDelete(OrderTicket());
}
}
}
}作者: koko1180 时间: 2018-1-11 02:15
学习学习 作者: fxking 时间: 2018-1-11 03:10
学习学习作者: zktq 时间: 2018-1-11 03:40
int start()
{
int total = OrdersTotal();
for(int i=total-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);
int type = OrderType();
bool result = false;
switch(type)
{
//Close pending orders
case OP_BUYLIMIT :
case OP_BUYSTOP :
case OP_SELLLIMIT :
case OP_SELLSTOP : result = OrderDelete( OrderTicket() );
}