please help for this function

 

h write this function

string triger()
 {
   if(iClose(Symbol(),timeframe,1)>iOpen(Symbol(),timeframe,1))
      {
         if((iClose(Symbol(),timeframe,1)-iOpen(Symbol(),timeframe,1))>(iHigh(Symbol(),timeframe,1)-iClose(Symbol(),timeframe,1)))
            return("buy");  
      }
   if(iClose(Symbol(),timeframe,1)<iOpen(Symbol(),timeframe,1)) 
     {
         if((iOpen(Symbol(),timeframe,1)-iClose(Symbol(),timeframe,1))>(iClose(Symbol(),timeframe,1)-iLow(Symbol(),timeframe,1)))
            return("sell");
     } 
   else return ("No signal"); 
 } 

but this error

'}' - not all control paths return a value


 
  1. string triger()
     {
       if(…
       if(…
       else return ("No signal"); 
    
    What do you return here when all if's and else's are done?
     } 
  2. An if(condition) statementA else StatementB; does A or does B and then the statement(s) after. If A ends in a return, then drop the else, B becomes the statement(s) after. If B ends in a return, reverse the condition and statements.
 
William Roeder:
  1. An if(condition) statementA else StatementB; does A or does B and then the statement(s) after. If A ends in a return, then drop the else, B becomes the statement(s) after. If B ends in a return, reverse the condition and statements.

thank,s