刚开始学,这个代码为什么会错?求帮助

要添加评论,请登录注册
SQ_spirit
19
SQ_spirit  

  if (rt[0].close>=iHigh(_Symbol,0,H))
      {
      if (m_position.Select(_Symbol))
       m_trade.PositionClose(_Symbol);
        
      else //if(OrdersTotal()==0)
      m_trade.PositionOpen(_Symbol,ORDER_TYPE_BUY,Lots,SYMBOL_BID,0,0,"Buy"); 
   }

Error:'if'-Semicolon expected

ZhuaJinLieShou
88
ZhuaJinLieShou  
SQ_spirit:

  if (rt[0].close>=iHigh(_Symbol,0,H))
      {
      if (m_position.Select(_Symbol))
       m_trade.PositionClose(_Symbol);
        
      else //if(OrdersTotal()==0)
      m_trade.PositionOpen(_Symbol,ORDER_TYPE_BUY,Lots,SYMBOL_BID,0,0,"Buy"); 
   }

Error:'if'-Semicolon expected

第二个if下面缺少一对“ { } ”

要添加评论,请登录注册