DIF: EMA(CLOSE,8) - EMA(CLOSE,13),COLORWHITE;
DEA: EMA(DIF,9),COLORYELLOW;
MACD: 2*(DIF-DEA), COLORSTICK;
CZ:(DIF-DEA)/DIF,NODRAW;
DRAWICON(CROSS(DIF,DEA),DIF*0.98,1);
DRAWICON(CROSS(DEA,DIF),DIF*0.98,2);
0,COLORLIRED;
DIF落差:(DIF-REF(DIF,1)),NODRAW;
DEA落差:(DEA-REF(DEA,1)),NODRAW;
IF(DIF落差>0,DIF,DRAWNULL),COLORRED;
IF(DIF落差<0,DIF,DRAWNULL),COLORGREEN;
IF(DEA落差>0,DEA,DRAWNULL),COLORRED;
IF(DEA落差<0,DEA,DRAWNULL),COLORGREEN;
临界点:ABS(CZ)>0 AND ABS(CZ)<0.3 AND DIF>DEA AND DIF<REF(DIF,1),NODRAW;
DRAWTEXT(临界点,DIF,'L');
MACD柱比:(MACD-REF(MACD,1))/REF(MACD,1),NODRAW;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0,0),COLORGREEN;
月DIF:="MACD.DIF#MONTH"COLOR0080FF;
月DEA:="MACD.DEA#MONTH",COLOR0080FF,LINETHICK2;
周DIF:="MACD.DIF#WEEK"COLORRED;
周DEA:="MACD.DEA#WEEK",COLORRED,LINETHICK2;
日DIF:="MACD.DIF",COLORWHITE;
日DEA:="MACD.DEA",COLORWHITE,LINETHICK2;
日金:IF(CROSS(日DIF,日DEA),0.125,0),COLORYELLOW;
周金:IF(CROSS(周DIF,周DEA),0.15,0),COLORRED;
月金:IF(CROSS(月DIF,月DEA),0.175,0),COLORGREEN;
DRAWICON(周金 AND 日金,-0.1,7);
DRAWICON(周金 AND 月金,-0.15,11);
DRAWICON(日金 AND 月金,-0.1,1);
日死:IF(CROSS(日DEA,日DIF),-0.1,0),COLORYELLOW;
周死:IF(CROSS(周DEA,周DIF),-0.125,0),COLORRED;
月死:IF(CROSS(月DEA,月DIF),-0.15,0),COLORGREEN;
DRAWICON(周死 AND 日死,-0.1,8);
DRAWICON(周死 AND 月死,-0.15,12);
DRAWICON(日死 AND 月死,-0.15,2);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,
底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
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),COLORGREEN,LINETHICK4;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三同时'),COLOR0000FF,LINETHICK2;
IF(DIF<0,DIF,0),COLORRED,LINETHICK1;
IF(DIF<0,0,DIF),COLORRED,LINETHICK1;
IF(DIF<DEA,DIF,DEA),COLOR00FF00,LINETHICK1;
IF(DIF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;
金叉:=CROSS(DIF,DEA) AND DIF<0.3;
上一篇:将【突击】和【强势】两个选股公式合并一个选股公式 下一篇:将【启动】指标做的选股公式