bool CloseSide(const bool isBuy, const string why) {    bool anyFailed = false;    for(int i = Posit ...

| 发表于 半小时前 | 显示全部楼层 |复制链接
bool CloseSide(const bool isBuy, const string why)
{
   bool anyFailed = false;
   for(int i = PositionsTotal() - 1; i >= 0; i--) {
      ...
      if(!ClosePositionRetry(ticket, "方向平仓")) anyFailed = true;
   }
   if(!anyFailed) DeletePendings(isBuy);  // 全平成功才删挂单
   PrintFormat(...);
   return !anyFailed;
}
最近访问 头像模式
举报

评论 使用道具

发新帖
EA交易
您需要登录后才可以评论 登录 | 立即注册