MACD二次金叉(顶背离、底背离)

2011-02-19 11:17:00来源:本站整理浏览:205

MACD二次金叉(顶背离、底背离)
DIF:EMA(C,12)-EMA(C,26),COLORRED;
DEA:EMA(DIF,9);
MACD:2*(DIF-DEA),COLORSTICK;

JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*0.9,1);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORWHITE,LINETHICK2;
 

A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLOR824173,LINETHICK2;



 

股票公式栏目导航

本类热门

相关公式