MACD底背离加强版 通达信指标代码分享!


示意图



MACD底背离加强版  通达信指标代码分享!


代码分享





macd[_a1_]副图代码:

SHORT:=12;LONG:=26;MID:=9;


DIF1:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA1:EMA(DIF1,MID);
MACD1:(DIF1-DEA1)*2,COLORSTICK;
DRAWICON(REF(DIF1,1)<REF(DIF1,2) AND DIF1>REF(DIF1,1) AND DIF1<0 AND DIF1<DEA1,DIF1*1.1,38),COLORRED;
GUP2:=BARSLAST(REF(MACD1,1)<0 AND MACD1>0);
GUP3:=LLVBARS(MACD1,GUP2+20);
GUP4:=IF(GUP3>GUP2,REF(MACD1,GUP3),0);
GUP5:=MACD1<0 AND MACD1>GUP4 AND LOW=LLV(LOW,GUP2+20) AND GUP4<0;
GUP6:=REF(GUP5,1)=1 AND MACD1>REF(MACD1,1) AND REF(DIF1,GUP3)<0 AND MACD1<0;
背离:DRAWLINE(GUP4=GUP3,MACD1,GUP6,MACD1,0),COLORRED,DOTLINE;
DRAWICON(GUP6,MACD1*1.2,25);
GUP7:=HHVBARS(MACD1,GUP2+20);
GUP8:=IF(GUP7>GUP2,REF(MACD1,GUP7),0);
GUP9:=MACD1>0 AND MACD1<GUP8 AND HIGH=HHV(HIGH,GUP2+20) AND GUP8>0;
GUP10:=REF(GUP9,1)=1 AND MACD1>REF(MACD1,1) AND REF(DIF1,GUP7)>0;
顶背离:DRAWLINE(GUP8=GUP7,MACD1,GUP10,MACD1,0),COLOR1D7300,DOTLINE;
DRAWICON(GUP10,MACD1*1.2,27);
GUP11:=CLOSE/MA(CLOSE,40)*100<78;
GUP12:=CLOSE/MA(CLOSE,60)*100<74;
GUP13:=HIGH>LOW*1.051;
GUP14:=GUP13 AND COUNT(GUP13,5)>1;
GUP15:=IF(GUP14 AND (GUP11 OR GUP12),2,0);
GUP16:=CLOSE/REF(CLOSE,25)<=1.1;
GUP17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
GUP18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
GUP19:=SMA(GUP18,2,1);
GUP20:=SMA(GUP19,2,1);
GUP21:=IF(GUP19>REF(GUP19,1) AND REF(GUP19,1)<REF(GUP19,2) AND GUP19<23,1.5,0);
GUP22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
GUP23:=MA(CLOSE,5);
GUP24:=IF(CLOSE>SAR(10,2,20),1,0);
GUP25:=IF(CLOSE<SAR(10,2,20),(-1),0);
GUP26:=ATAN((GUP23/REF(GUP23,1)-1)*100)*180/3.1416;
GUP27:=IF(GUP26>30,1,0);
GUP28:=IF(GUP26<(-30),(-1),0);
GUP29:=GUP24+GUP27+GUP25+GUP28;
IF(GUP29<(-1) OR GUP22<25.01,DIF1,DRAWNULL),COLOR1D7300;
IF(GUP22>74.989998 OR GUP29>0,DIF1,DRAWNULL),COLORRED;
0,COLORBROWN,POINTDOT;




红宝石选股:

SHORT:=12;LONG:=26;MID:=9;


DIF1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA1:=EMA(DIF1,MID);
MACD1:=(DIF1-DEA1)*2;
GUP2:=BARSLAST(REF(MACD1,1)<0 AND MACD1>0);
GUP3:=LLVBARS(MACD1,GUP2+20);
GUP4:=IF(GUP3>GUP2,REF(MACD1,GUP3),0);
GUP5:=MACD1<0 AND MACD1>GUP4 AND LOW=LLV(LOW,GUP2+20) AND GUP4<0;
GUP6:=REF(GUP5,1)=1 AND MACD1>REF(MACD1,1) AND REF(DIF1,GUP3)<0 AND MACD1<0;
红钻石图标:GUP6;



红三角选股:

SHORT:=12;LONG:=26;MID:=9;


DIF1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA1:=EMA(DIF1,MID);
GUP11:=CLOSE/MA(CLOSE,40)*100<78;
GUP12:=CLOSE/MA(CLOSE,60)*100<74;
GUP13:=HIGH>LOW*1.051;
GUP14:=GUP13 AND COUNT(GUP13,5)>1;
红三角图标:REF(DIF1,1)<REF(DIF1,2) AND DIF1>REF(DIF1,1) AND DIF1<0 AND DIF1<DEA1;



发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注

有些内容是需要登录本网站才可以查看的,若是需要登录的话,欢迎加站长微信“laogong0311”,站长免费帮大家注册账号!

遇到问题?请给我们留言

请填写您的电话号码,我们将回复您电话