MACD:"MACD.MACD",COLORSTICK;
WW:=MACD<MIN(REF(MACD,1),REFX(MACD,1));
QQ:=MACD>MAX(REF(MACD,1),REFX(MACD,1));
TT:=BARSLAST(WW);
DD:=BARSLAST(QQ);
AA:=WW
AND
C<REF(C,REF(TT,1)+1) AND MACD>REF(MACD,REF(TT,1)+1) ;
AC:=QQ
AND C>REF(C,REF(DD,1)+1) AND
MACD<REF(MACD,REF(DD,1)+1);
DRAWLINE(TT=0,MACD,AA,MACD,0);
DRAWLINE(DD=0,MACD,AC,MACD,0);