Asesores Expertos: ZigZag EA

 

ZigZag EA:

Aesesor según el indicador ZigZag. Trabajo con órdenes pendientes Buy Stop y Sell Stop.

ZigZag EA

Autor: Vladimir Karputov

 
Buenas, saludos gracias por tus aportaciones, sòlo un comentario el robot tiene dos errores de compilaciòn podras decir como se corrigen, es de retorno 
 
YANETT PIRELA #:
Buenas, saludos gracias por tus aportaciones, sòlo un comentario el robot tiene dos errores de compilaciòn podras decir como se corrigen, es de retorno 

El error está en esta función:

//+------------------------------------------------------------------+
//| Lots or risk in percent for a deal from a free margin            |
//+------------------------------------------------------------------+
bool LotsOrRisk(const double lots,const double risk,const int digits_adjust)
  {
   if(lots<0.0 && risk<0.0)
     {
      Print(__FUNCTION__,", ERROR: Parameter (\"lots\" or \"risk\") can't be less than zero");
      return(false);
     }
   if(lots==0.0 && risk==0.0)
     {
      Print(__FUNCTION__,", ERROR: Trade is impossible: You have set \"lots\" == 0.0 and \"risk\" == 0.0");
      return(false);
     }
   if(lots>0.0 && risk>0.0)
     {
      Print(__FUNCTION__,", ERROR: Trade is impossible: You have set \"lots\" > 0.0 and \"risk\" > 0.0");
      return(false);
     }
   if(lots>0.0)
     {
      string err_text="";
      if(!CheckVolumeValue(lots,err_text))
        {
         Print(__FUNCTION__,", ERROR: ",err_text);
         return(false);
        }
     }
   else if(risk>0.0)
     {
      if(m_money!=NULL)
         delete m_money;
      m_money=new CMoneyFixedMargin;
      if(m_money!=NULL)
        {
         if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
            return(INIT_FAILED);
         m_money.Percent(risk);
        }
      else
        {
         Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
         return(INIT_FAILED);
        }
     }
//---
   return(true);
  }

Para que funcione debes cambiar return (INIT_FAILED); por return false;

Supongo que en alguna versión anterior funcionaría, pero ahora no es una expresión booleana

Razón de la queja: