MACD背驰,和谐通达信源码分享 副图
{公式名称: MACD背驰公式类型: 技术指标公式-其他类型画线方法: 副图公式源码:}DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIFF,9);MACD:2*(DIFF-DEA),COLORSTICK,LINETHICK2;VAR1:=CROSS(DIFF,DEA) AND DIFF<(-0.1);STICKLINE(VAR1,0,0.08,6,0),COLORYELLOW;DRAWTEXT(VAR1,0.16,44),COLORWHITE;VAR2:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));VAR3:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(VAR2=2,21)=1;STICKLINE(VAR3,0,0.06,6,0),COLORMAGENTA;DRAWICON(VAR3,DEA*0.9,1);DRAWTEXT(VAR3,DEA,45),COLORYELLOW;VAR4:=BARSLAST(REF(CROSS(DIFF,DEA),1));VAR5:=REF(CLOSE,VAR4+1)>CLOSE AND DIFF>REF(DIFF,VAR4+1) AND CROSS(DIFF,DEA);STICKLINE(VAR5,0,0.03,6,0),COLORGREEN;底背