DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9),COLOR888888;
MACD:(DIF-DEA)*2,COLORSTICK;
NOTEXT5:IF(DIF =DEA, DIF,DRAWNULL),COLORRED;
NOTEXT6:IF(DIF DEA, DIF,DRAWNULL),COLORWHITE;
AT1:=BARSLAST(REF(CROSS(DIF,DEA),1));
BT1:=REF(C,AT1+1) C AND REF(DIF,AT1+1) DIF AND CROSS(DIF,DEA);
AT2:=BARSLAST(REF(CROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)),1));
CT1:=BARSLAST(REF(CROSS(DEA,DIF),1));
DT1:=REF(C,CT1+1) C AND REF(DIF,CT1+1) DIF AND CROSS(DEA,DIF);
MACD底背:IF(BT1 0,-0.1,0),COLORRED;
MACD顶背:IF(DT1 0,0.1,0),COLOR00FF00;
STICKLINE(BT1 0,0.5*DIF,0,2,0),COLORRED;
STICKLINE(DT1 0,0.5*DIF,0,2,0),COLOR00FF00;
{九毛八公式指标网www.9m8.cn};