how to write multiple Strategy on the same EA

 

Hi ALL,



Sorry to Bother u guys, i bought the EA in mql5 Market, but the Developer is no longer reply anymore, 


   int getSignal() {
   
   double Amin = rsi(1)-rsi(2);
   double Bmin = rsi(3)-rsi(4);
   double Cmin = rsi(5)-rsi(6);
   
   
      if(Amin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)<35))
         return OP_BUY;
   
      if(Amin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)>65))
         return OP_SELL;
                           
      return -1;
     
   
   }
   //+------------------------------------------------------------------+

and now i want to add more Strategy on the same EA, like if A Strategy then buy ; B Strategy then buy.


I want to add more Strategy like that but theres some error: 'getSignal' - function already defined and has body / see previous declaration of function 'getSignal'



   int getSignal() {
   
   double Amin = rsi(1)-rsi(2);
   double Bmin = rsi(3)-rsi(4);
   double Cmin = rsi(5)-rsi(6);
   
   
      if(Amin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)<35))
         return OP_BUY;
   
      if(Amin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)>65))
         return OP_SELL;



      if(Bmin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)<35))
         return OP_BUY;
   
      if(Bmin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)>65))
         return OP_SELL;



      if(Cmin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)<35))
         return OP_BUY;
   
      if(Cmin<0.0001&&(iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0)>65))
         return OP_SELL;


                           
      return -1;
     
   
   }
   //+------------------------------------------------------------------+


So How can i add 2 or more Strategy at the same place? 


Thanks!

 
own Inside:

Hi ALL,



Sorry to Bother u guys, i bought the EA in mql5 Market, but the Developer is no longer reply anymore, 


and now i want to add more Strategy on the same EA, like if A Strategy then buy ; B Strategy then buy.


I want to add more Strategy like that but theres some error: 'getSignal' - function already defined and has body / see previous declaration of function 'getSignal'




So How can i add 2 or more Strategy at the same place? 


Thanks!

You can ask in the freelance section, create a job there, explain the situation, and there will be developer willing to help. we can not figure that out here, the way i read the code and what you want it to do, there is a lot of coding needed

Reason: