I updated your question title so that is makes sense to other users and is easier to locate in when searching for this type of solution. Your previous title included details that were unnecessary and omitted details that were most helpful.
Here is the solution you requested. I have included user inputs so that other visitors of this post will be able to adjust the settings to fit their own preferences.
input fastLengthOne = 8;
input slowLengthOne = 17;
input MACDLengthOne = 9;
input averageTypeOne = AverageType.HULL;
input fastLengthTwo= 8;
input slowLengthTwo= 17;
input MACDLengthTwo= 9;
input averageTypeTwo= AverageType.EXPONENTIAL;
def diffOne = MACD(fastLengthOne, slowLengthOne, MACDLengthOne, averageTypeOne).Diff;
def diffTwo = MACD(fastLengthTwo, slowLengthTwo, MACDLengthTwo, averageTypeTwo).Diff;
def bothAboveZero = diffOne > 0 and diffTwo > 0;
def bothBelowZero = diffOne < 0 and diffTwo < 0;
plot bothAbove = bothAboveZero and !bothAboveZero[1];
bothAbove.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bothAbove.SetDefaultColor(Color.CYAN);
plot bothBelow = bothBelowZero and !bothBelowZero[1];
bothBelow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bothBelow.SetDefaultColor(Color.MAGENTA);
Screenshot below shows how this appears on a daily chart of AAPL.