#Plot lines with differences between two moving averages
declare lower;
input price = close;
input sma1 = 9;
input sma2 = 26;
plot line1 = Average(price, sma1) - Average(price, sma2);
plot ZeroLine = 0;
plot Max = Highest(Average(price, sma1) - Average(price, sma2), sma2);
plot StrongUpSignal = if line1 equals Max
and line1 crosses Max
and price is greater than Zeroline
then ZeroLine else Double.NaN;
StrongUpSignal.SetDefaultColor(Color.UPTICK);
StrongUpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
line1.SetDefaultColor(Color.GREEN);