通达信MACD背离自动画线副图指标 源码 贴图

[复制链接]
查看38 | 回复0 | 2022-7-11 11:11:05 | 显示全部楼层 |阅读模式
DIF:MACD.DIF(12,26,9),LINETHICK2;
DEA:MACD.DEA(12,26,9);
MACD:(DIF-DEA)*2,COLORSTICK;
DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;
DRAWICON(CROSS(DEA,DIF) AND DIF>0,DIF,37),COLORGREEN;
DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
DRAWICON(CROSS(DIF,DEA) AND DIF<0,DIF,36),COLORRED;
XA_1:=MACD<0 AND MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
STICKLINE(XA_1,0,MACD,0.3,0),COLORRED;
XA_2:=MACD>0 AND MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3) AND REF(MACD,3)>REF(MACD,4);
STICKLINE(XA_2,0,MACD,0.3,0),COLORGREEN;
XA_3:=100-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))-50;
XA_4:=EMA(XA_3,3);
NOTEXTLU:IF(XA_4>24.99,DIF,DRAWNULL),COLORRED,LINETHICK2;
NOTEXTLU2:IF(XA_4<(-40.009998),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
NOTEXT0:0,DOTLINE,COLORLIGRAY;
XA_5:=IF(PERIOD=0,0.7,IF(PERIOD=1,1.2,IF(PERIOD=2,2,IF(PERIOD=3,2.5,IF(PERIOD=4,3,IF(PERIOD=5,5.5,IF(PERIOD=6,6,IF(PERIOD=7,7,IF(PERIOD=8,3.5,4)))))))));
XA_6:=BARSLAST(CROSS(MACD,0));
XA_7:=REF(XA_6,1)>0 AND XA_6=0;
XA_8:=BARSLAST(XA_7);
XA_9:=REF(XA_6,XA_8+1);
XA_10:=HHVBARS(MACD,XA_8+XA_9);
XA_11:=IF(XA_10>XA_8,REF(MACD,XA_10),0);
XA_12:=IF(XA_10>XA_8,REF(HIGH,XA_10),0);
XA_13:=IF(REF(HIGH,1)=HHV(HIGH,XA_8+XA_9),REF(HIGH,1),0);
XA_14:=(XA_13-XA_12)/XA_12*100;
XA_15:=COUNT(CROSS(0,MACD),XA_8+XA_9);
XA_16:=MACD>0 AND MACD<XA_11 AND HIGH=HHV(HIGH,XA_8+XA_9) AND XA_11>0 AND XA_15=1;
XA_17:=REF(XA_16,1) AND HIGH<REF(HIGH,1) AND MACD>0 AND XA_11>0;
XA_18:=LLVBARS(MACD,XA_8+XA_9);
XA_19:=IF(XA_18>XA_8,REF(MACD,XA_18),0);
XA_20:=IF(XA_18>XA_8,REF(LOW,XA_18),0);
XA_21:=IF(REF(LOW,1)=LLV(LOW,XA_8+XA_9),REF(LOW,1),0);
XA_22:=(XA_20-XA_21)/XA_20*100;
XA_23:=COUNT(CROSS(MACD,0),XA_8+XA_9);
XA_24:=MACD<0 AND MACD>XA_19 AND LOW=LLV(LOW,XA_8+XA_9) AND XA_19<0 AND COUNT(CROSS(MACD,0),XA_8+XA_9)<=3;
XA_25:=REF(XA_24,1) AND LOW>REF(LOW,1) AND MACD<0 AND XA_19<0;
前高:IF(XA_17,XA_12,DRAWNULL),NODRAW,COLOR7FFF00;
现高:IF(XA_17,XA_13,DRAWNULL),NODRAW,COLORGREEN;
幅度_顶:IF(XA_17,XA_14,DRAWNULL),NODRAW,COLORYELLOW;
原低:IF(XA_25,XA_20,DRAWNULL),NODRAW,COLORLIMAGENTA;
现低:IF(XA_25,XA_21,DRAWNULL),NODRAW,COLORRED;
幅度_底:IF(XA_25,XA_22,0),NODRAW,COLORYELLOW;
DRAWICON(XA_25,MACD,26);
DRAWICON(XA_17,MACD,27);
XA_26:=BACKSET(XA_17,XA_10+1);
XA_27:=BACKSET(XA_25,XA_18+1);
NOTEXTMACDL:DRAWLINE(REF(XA_27,1)=0 AND XA_27=1 AND MACD<0,MACD,XA_25,MACD,0),COLORRED;
NOTEXTMACDH:DRAWLINE(REF(XA_26,1)=0 AND XA_26=1 AND MACD>0,MACD,XA_17,MACD,0),COLORGREEN;
涨家数:INDEXADV,NODRAW,COLORRED;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
正量能:涨家数/(涨家数+跌家数)*100,NODRAW,COLORMAGENTA;
负量能:跌家数/(涨家数+跌家数)*100,NODRAW,COLORYELLOW;


201752422582861268.png

201752422582861268.png

201752422594637788.rar

4.43 KB, 下载次数: 0

售价: 1 金钱  [记录]  [购买]

201752422594637788.rar

回复

使用道具 举报

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

本版积分规则