通达信我的MACD指标副图

[复制链接]
查看68 | 回复0 | 2022-7-24 08:08:10 | 显示全部楼层 |阅读模式

通达信我的MACD指标副图

DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
加仓:IF(DIFF<0,0,DIFF),COLORRED,LINETHICK2;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,1,0),COLORRED;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,1,0),COLORMAGENTA;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,1,0),COLORLIMAGENTA;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,1,0),COLORLIRED;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,1.5,0),COLORYELLOW;
DRAWTEXT(CROSS(DEA,DIFF) AND DIFF>0.1,DIFF,'破位'),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,1.5,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORWHITE;
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,顶背离,DEA,0),COLORGREEN,LINETHICK2;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;
换手率:VOL/CAPITAL*100,NODRAW;
{量比与换手率(今天与历史)}
JL5:=MA(V,5);
现量比:DYNAINFO(17),NODRAW,COLORYELLOW;
历史量比:IF(DYNAINFO(4)=O AND DYNAINFO(5)=H AND DYNAINFO(6)=L AND
DYNAINFO(7)=C,DYNAINFO(17),V/JL5),COLORWHITE,NODRAW;
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORWHITE;
VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0) OR (ISLASTBAR AND MACD<0),REF(VA3,1)+2),0.5);
前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),COLORYELLOW;
W3:STICKLINE(MACD>0 AND MACD>前高 AND 前高>0,MACD,前高,2,0),COLORYELLOW;
W4:STICKLINE(MACD<0 AND MACD<前低 AND 前低<0,MACD,前低,2,0),COLORGREEN;
 

81555355.jpg

81555355.jpg

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则