黄金macd底顶背离通达信指标公式

DSFF:EMA(CLOSE,10)-EMA(CLOSE,22);
DSA:EMA(DSFF,5),COLORFFAA00;
MACDA:=2*(DSFF-DSA);{财神指标网WWW.HAO169CN.COM}
STICKLINE(MACDA>=0,MACDA,0,4,1),COLORF00FF0;
STICKLINE(MACDA<0,MACDA,0,4,1),COLORWHITE;
STICKLINE(MACDA<REF(MACDA,1) AND MACDA>0,0,MACDA,4,0 ),COLOR00AAFF;
X1:IF(DSFF<0,DSFF,0),COLOR0000FF,LINETHICK2;
X2:IF(DSFF<0,0,DSFF),COLORMAGENTA,LINETHICK1;
X3:IF(DSFF<DSA,DSFF,DSA),COLOR00FF00,LINETHICK1;
X4:IF(DSFF>DSA,DSA,DSA),LINETHICK1,COLORFFBB11;
金叉J:=CROSS(DSFF,DSA) AND DSFF<-0.1;
STICKLINE(金叉J,DSA*0.86,DSA*0.66,6,0),COLORYELLOW;
DRAWTEXT(金叉J,DSA*0.86,' 低'),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DSFF,DSA),BARSLAST(DSA>=0));
金叉Q:=CROSS(DSFF,DSA) AND DSA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(金叉Q,DSA*0.96,DSA*0.76,6,0),COLORFF00FF;
DRAWICON(金叉Q,DSA*1.1,'BUY') ;
DRAWTEXT(金叉Q,DSA*0.96,' 二叉'),COLORCYAN;
A1:=BARSLAST(REF(CROSS(DSFF,DSA),1));
B背离:=REF(CLOSE,A1+1)>CLOSE AND DSFF>REF(DSFF,A1+1) AND CROSS(DSFF,DSA);
STICKLINE(B背离,DSA*1.09,DSA*0.86,6,0),COLOR00FF00;
DRAWLINE(A1=0,DSA,B背离,DSA,0),COLORRED,LINETHICK1;
DRAWTEXT(B背离,DSA*1.09,' 底'),COLORDD22FF;
A2:=BARSLAST(REF(CROSS(DSA,DSFF),1));
A背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DSFF,A2+1)>DSFF AND CROSS(DSA,DSFF);
DRAWLINE(A2=0,DSA,A背离,DSA,0),COLORGREEN,LINETHICK1;
DRAWTEXT(A背离,DSA*1.02,' 顶'),COLOR00FF00;

(0)

相关推荐