```
# Double MACD Signals
# Assembled by BenTen at useThinkScript.com
# Based on the request of 9ramone7
declare lower;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input fastLength2 = 3;
input slowLength2 = 10;
input MACDLength2 = 16;
input averageType = AverageType.EXPONENTIAL;
def Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
def Avg = MovingAverage(averageType, Value, MACDLength);
def Value2 = MovingAverage(averageType, close, fastLength2) - MovingAverage(averageType, close, slowLength2);
def Avg2 = MovingAverage(averageType, Value, MACDLength2);
def Diff = Value - Avg;
def Diff2 = Value2 - Avg2;
def ZeroLine = 0;
def UpSignal1 = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
def DownSignal1 = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;
def UpSignal2 = if Diff2 crosses above ZeroLine then ZeroLine else Double.NaN;
def DownSignal2 = if Diff2 crosses below ZeroLine then ZeroLine else Double.NaN;
plot UpSignal = UpSignal1 and UpSignal2;
plot DownSignal = DownSignal1 and DownSignal2;
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
```