DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,MACD,0,0,-1),COLORRED;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD,0,0,-1),COLORGRAY;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD,0,0,-1),COLORCYAN;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,MACD,0,0,-1),COLORGREEN;
抄底:ABS((CROSS(DIFF,DEA) && DEA<=-)*DIFF)*,COLORMAGENTA,LINETHICK2;
QA:DIFF,COLORWHITE,LINETHICK2;
QB:=DEA,COLORCYAN;
上涨:IF(QA>QB,QA,NULL),COLORRED,LINETHICK2;
下跌:IF(QA<QB,QA,NULL),COLORGREEN,LINETHICK2;
NOTEXTWB:IF(QB<QA,QB,NULL),COLORMAGENTA;
DRAWTEXT(ABS(抄底)>0,抄底*,' 买'),COLORYELLOW;
DRAWICON(ABS(抄底)>0,-,11);
K:=MACD>REF(MACD,1) AND MACD<0 AND REF(MACD,1)<REF(MACD,2);
左侧:K,COLORMAGENTA,NODRAW;
STICKLINE(K,0,MACD,1,0),COLORMAGENTA;
DRAWICON(CROSS(QA,QB) AND QA<,QB*,1);
DRAWICON(CROSS(QB,QA) AND QB>,QB*,2);
TJ:=MACD>0;
T:=MACD<0;
高位反转:=MACD>0 AND MACD<REF(MACD ,1) AND REF(MACD ,1)>REF(MACD ,2) AND REF(MACD ,2)>REF(MACD ,3) AND REF(MACD ,3)>REF(MACD ,4);
STICKLINE(高位反转,0,MACD,1,0),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)
期货软件指标文华财经指标公式源码期货指标逃顶指标源码 来自淘豆网m.daumloan.com转载请标明出处.