DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA);
Zero : 0;
DIFF0:EMA(CLOSE,30)-EMA(CLOSE,60),colorred;
DEA0:EMA(DIFF0,15);
MACD0:=3*(DIFF0-DEA0);
DIF0:=EMA(CLOSE,9)-EMA(CLOSE,18);
DEA1:=EMA(DIF0,7);
下穿:=COUNT(DEA1<=0,5)=1 AND DEA1<=0;
上穿:=COUNT(DEA1>=0,5)=1 AND DEA1>=0;
DRAWTEXT(下穿,LOW*0.01,'↓'),coloryellow;
DRAWTEXT(上穿,LOW*0.01,'↑'),COLOR0000FF;
zuyi:=DIFF>=DEA AND DEA>=DIFF0 AND DIFF0>=DEA0;
DRAWTEXT(zuyi,DEA0,'*') ,colorred;
guanzu:=DEA>=DIFF AND DIFF>=DIFF0 AND MACD>=REF(MACD,1) AND DIFF0>=REF(DIFF0,1);
DRAWTEXT(guanzu,DEA0,'◆') ,coloryellow;