Experts: ZigZag EA - page 6

 

Sure.

It is not displayed at all in the Experts.

When I open it in the editor and recompile it, I get the following error:


'INIT_FAILED' - expression not boolean ZigZag EA.mq5 427 20

'INIT_FAILED' - expression not boolean ZigZag EA.mq5 433 17

 
Satbieter #:

Sure.

It is not even displayed in the Experts.

When I open it in the editor and recompile it, I get the following error:


'INIT_FAILED' - expression not boolean ZigZag EA.mq5 427 20

'INIT_FAILED' - expression not boolean ZigZag EA.mq5 433 17

OnInit is terminated with an error (INIT_PARAMETERS_INCORRECT, line 135) - therefore it does not appear on the chart.

So, what did you specify for:

input double      InpLots           = 0;              // Lots (or "Lots">0 and "Risk"==0 or "Lots"==0 and "Risk">0)
input double      Risk              = 5;              // Risk (or "Lots">0 and "Risk"==0 or "Lots"==0 and "Risk">0)
 
 

Now it works .

Perfect.

 

Dear Vladimir,

nice to know this EA. Could you add 2 more ZigZag indicators? entry and exit rule: entry 2 zigzag meet in 1 price, exit 2 zigzag meet in 1 price. do the same with 3 zigzag. You can make it options, should use this entry/exit or not.

thanks for further confirmation.

 
I couldn't find version 1.006. help please?
 
need to improve, add a fractal to save from news, add stop and take in pips instead of fibo, and add reversal, and so the owl is excellent, you can choose the settings profitable, and add a limit of orders for hedge.
 
great advisor !!!!!!!
 
Good, greetings thanks for your contributions, just a comment the robot has two compilation errors, could you say how to correct them, it is return
 
YANETT PIRELA compilation errors could you say how to correct, is return

The error is in this function:

//+------------------------------------------------------------------+
//| 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);
  }

For it to work you must change return (INIT_FAILED); by return false;

I guess it would work in a previous version, but now it is not a boolean expression.