通达信NEWMACD副图指标
SHORT:=5;
LONG:=55;
MID:=10;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
VAR1:DIF,COLORRED;
VAR2:DEA,COLORRED;
关注:IF(VAR1>REF(VAR1,1),VAR1,DRAWNULL),COLORRED;
持股:IF(VAR2>REF(VAR2,1),VAR2,DRAWNULL),COLORRED;
观望:IF(VAR1<REF(VAR1,1),VAR1,DRAWNULL),COLORGREEN;
持币:IF(VAR2<REF(VAR2,1),VAR2,DRAWNULL),COLORGREEN;
X_1:=MACD.MACD*3;{天天查股网WWW.ttchagu.com}
X_2:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
X_3:=CROSS(BACKSET(CROSS(0,MACD),REF(X_2,1)+2),0.5);
X_4:=DRAWLINE(X_3,MACD,REF(X_3,1),REF(MACD,1),1);
STICKLINE(MACD>X_4,MACD,X_4,0.0001,0),COLORWHITE;