{新MACD}
DIFF:(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26),LINETHICK0;
DEA:EMA(DIFF,9),LINETHICK0;
DRAWBAND(DIFF,RGB(155,50,50),DEA,RGB(0,100,50));
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
STICKLINE(MACD REF(MACD,1)AND MACD 0,0,MACD,0.5,0),COLORFFFF00;
STICKLINE(MACD REF(MACD,1)AND MACD 0,0,MACD,0.5,0)COLOR00FF00;
STICKLINE(MACD REF(MACD,1)AND MACD,0,MACD,0.5,0),COLOR00FFFF;
STICKLINE(MACD REF(MACD,1)AND MACD 0,0,MACD,0.5,0),COLORRED;
沉:IF(DIFF =DEA,DIFF,DRAWNULL),COLORRED;
着:IF(DEA =DIFF,DEA,DRAWNULL),COLORFF9900;
冷:IF(DIFF =DEA,DEA,DRAWNULL),COLOR00FFFF;
静:IF(DEA =DIFF,DIFF,DRAWNULL),COLOR00FF00;
AA:=BARSLAST(REF(CROSS(DIFF,DEA),1));
BB:=REF(CLOSE,AA+1) CLOSE AND DIFF REF(DIFF,AA+1) AND CROSS(DIFF,DEA);
乐:DRAWLINE(AA=0,DEA,BB,DEA,0),COLOR0000FF;
STICKLINE(BB,0,5,0,1),COLORFFFFFF;