MACD code help

 

Hi guys, I'm using a 2 line MACD in my strategy. My code is like this:

double MACDFast(int shift = 0)
  {
   double result = iCustom(Symbol(),PERIOD_CURRENT,"MACD 2Line",0,shift);
   return result;
  }
//
double MACDSlow(int shift = 0)
  {
   double result = iCustom(Symbol(),PERIOD_CURRENT,"MACD 2Line",1,shift);
   return result;
  }

int FuncMACDCrossOver(int shift = 0)
  {
   int result = 0;
   if(MACDFast(1) <= MACDSlow(1) && MACDFast(0) >= MACDSlow(0))
      result = 1;
   if(MACDFast(1) >= MACDSlow(1) && MACDFast(0) <= MACDSlow(0))
      result = 2;
   return result;
  }

  • Where I put the Code

if(FuncMACDCrossOver() == 1 && another condition){
   //Go Long
}
if(FuncMACDCrossOver() == 2 && another condition){
   //Go Short
}

I want to add another condition where the crossover is below MACD 0 value for go long and crossover is above MACD 0 value for go short. The problem is I cannot put FuncMACDCrossOver() < 0 since it is gonna interference with the MACD function. Any tips for making that new condition works?