DIFF : EMA(CLOSE,30) - EMA(CLOSE,60),colorred;
DEA : EMA(DIFF,20),colorgreen;
MACD : 2*(DIFF-DEA);
Zero : 0,colorliblue;
MM:=MACD;
GT:=MACD>REF(MACD,1) AND MACD>0;
STICKLINE(GT=1,0,MM,8),colormagenta;
DY:=MACD>REF(MACD,1) AND REF(MACD,2)>REF(MACD,1) AND REF(MACD,1)>0;
DRAWICON(DY=1,0,28);
GT2:=MACD<REF(MACD,1) AND MACD>0;
STICKLINE(GT2=1,MM,0,8),colorgreen;
上穿:=MACD>=0 AND REF(MACD,1)<0;
DRAWICON((上穿=1),DEA,1);
GG:=MACD>REF(MACD,1) AND MACD<0;
STICKLINE(GG=1,MACD,0,8),colorwhite;
上穿1:=CROSS(DEA,DIFF);
DRAWICON((上穿1=1),DEA,2);
GT3:=DIFF>REF(DIFF,1) AND MACD<0;
STICKLINE(GT3=1,-1.5*MACD,0,8),coloryellow;
STICKLINE(GT3=1,MACD,0,8),colorred;