// 检查是否已有订单bool CheckForOpenOrder(){ int total = OrdersTotal(); for (int i = total - 1; i >= 0; i--) { if (OrderSelect(i, SELECT_BY_POS) && (OrderSymbol() == Symbol() && OrderType() != ORDER_TYPE_SL_TP)) { return true; } } return false;
- // 检查是否已有订单
- bool CheckForOpenOrder()
- {
- int total = OrdersTotal();
- for (int i = total - 1; i >= 0; i--)
- {
- if (OrderSelect(i, SELECT_BY_POS) && (OrderSymbol() == Symbol() && OrderType() != ORDER_TYPE_SL_TP))
- {
- return true;
- }
- }
- return false;
- }
复制代码
}
|