同花顺MACD美颜版指标公式
2021/4/9 18:42:23
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK1;
DEA:EMA(DIFF,9),COLOrffaa00,LINETHICK1;
MACD:=2*(DIFF-DEA);
STICKLINE(MACD>=0,MACD,0,4,1),colorred,LINETHICK3;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),coloryellow,LINETHICK3;
STICKLINE(MACD<0,MACD,0,4,1),colorlired,LINETHICK3;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),colorligreen,LINETHICK3;
X1:IF(diff<0,diff,0),COLOR0000FF,LINETHICK1;
X2:IF(diff<0,0,diff),colormagenta,LINETHICK1;
X3:IF(diff<dea,diff,dea),COLOR00ff00,linethick1;
X4:IF(diff>dea,dea,dea),linethick1,COLORffbb11;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,DEA*0.86,DEA*0.66,10,0),colormagenta;
DRAWTEXT(低位金叉,dea*0.96,' ↖【低位金叉】'),colormagenta;
GPW:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,DEA*0.96,DEA*0.76,10,0),coloryellow;
DRAWICON(二次金叉,dea*1.1,'BUY') ;
DRAWTEXT(二次金叉,DEA*1.30,' ↖【二次金叉】'),coloryellow;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,DEA*1.09,DEA*0.86,10,0),Color6600FF;
DRAWLINE(A1=0,DEA,底背离,DEA,0),colorred,linethick2;
DRAWTEXT(底背离,DEA*1.60,' ↖【多方炮台】'),Color6600FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorligreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorligreen,LINETHICK2;
DRAWTEXT(顶背离,DEA*1.2,' ↖【顶背离】'),Color00FF00;
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>REF(DIFF,1) AND DEA>REF(DEA,1),colormagenta);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>REF(DIFF,1) AND DEA<REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=REF(DIFF,1) AND DEA>REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=REF(DIFF,1) AND DEA<REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>REF(DIFF,1) AND DEA>REF(DEA,1),colorred);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>REF(DIFF,1) AND DEA<REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=REF(DIFF,1) AND DEA>REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=REF(DIFF,1) AND DEA<REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),colorligreen);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),colorgray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),colorlired);
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIFF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
二次翻红:(FH3 OR FH4 OR FH5),colorred,NODRAW;
低买:CROSS(DIFF,DEA) AND DIFF<0,COLORFF00FF,NODRAW;
DRAWICON(二次翻红,-0.05,1);
DRAWTEXT(二次翻红,-0.35,'↖【翻红】'),colorred;
投股票 网 www.tou18.c n
股市公式下载推荐