通达信高低MACD指标公式
2021/1/16 18:47:04
SHORT:=12;
LONG:=26;
MID:=9;
GT:=60;
LT:=30;
X_1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
X_2:=EMA(X_1,MID);
X_3:=(X_1-X_2)*2;
NOTEXT:REF(X_1,1),NODRAW;
周期:CURRBARSCOUNT,NODRAW,COLORMAGENTA;
X_4:=BARSLAST(CROSS(X_1,X_2))+1;
X_5:=BARSLAST(CROSS(X_2,X_1))+1;
X_6:=FINDHIGHBARS(NOTEXT,0,GT,1);
IF(CURRBARSCOUNT<=CONST(X_6)+1,CONST(REF(NOTEXT,X_6)),DRAWNULL),COLORRED,LINETHICK3;
X_7:=IF(CURRBARSCOUNT<=CONST(X_6)+1,CONST(REF(NOTEXT,X_6)),DRAWNULL);
X_8:=FINDLOWBARS(NOTEXT,0,LT,1);
IF(CURRBARSCOUNT<=CONST(X_8)+1,CONST(REF(NOTEXT,X_8)),DRAWNULL),COLORGREEN,LINETHICK3;
X_9:=IF(CURRBARSCOUNT<=CONST(X_8)+1,CONST(REF(NOTEXT,X_8)),DRAWNULL);
DRAWICON(CROSS(X_1,X_7),X_7,1);
DRAWICON(CROSS(X_9,X_1),X_9,2);
STICKLINE(ISLASTBAR,X_9,X_7,10/2,(-1)),COLORMAGENTA;
STICKLINE(ISLASTBAR,(X_7+X_9)/2,(X_7+X_9)/2,5,1),COLORBLUE;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORWHITE;
DEA:EMA(DIF,MID),COLORYELLOW;
MACD:(DIF-DEA)*2,COLORSTICK;
看股吧公 式 www .kanguba.com
其它股票公式列表