"Not all control paths return a value" error

Back to topics list To post a new topic, please log in or register
avatar
2
Tradingemperor 2015.12.14 06:19
 

Hello, I am trying to code this system however after compiling it returns the "not all control paths return a value" and when I double click it shows its in the following block, could someone please point out the problem.

Thank you in advance

   {
      if(MainCCI[i] > ErgoCCI[i])
      {signal = "SHORT";}
      if (MainCCI[i] < ErgoCCI[i])
      {signal = "LONG";}
      if (MainCCI[i] == ErgoCCI[i])
      {signal = "NEUTRAL";}
 
    IndicatorShortName(""+signal);
   return(0); }
 }
//+------------------------------------------------------------------+
error
avatar
162
mql5 2015.12.14 08:49 #
 

   {
    if(MainCCI[i] > ErgoCCI[i])
      {signal = "SHORT";}
    if (MainCCI[i] < ErgoCCI[i])
      {signal = "LONG";}
    if (MainCCI[i] == ErgoCCI[i])
      {signal = "NEUTRAL";}
 
    IndicatorShortName(""+signal);
    return(0);
   }

  // !!! return is absent in this block
 }
//+------------------------------------------------------------------

avatar
2
Tradingemperor 2015.12.14 09:34 #
 

mql5: I have tried it but it still doesn't work. Does it have a bug or something? :(

error 2


Back to topics list  

To add comments, please log in or register