返回顶部
开启左侧

[通达信] 智能MACD(通达信公式 副图 源码 测试图)

[复制链接]
股票大数据 首发新人 显示全部楼层 发表于 2021-10-8 17:10:53 |阅读模式 打印 上一主题 下一主题
{智能MACD}

{DRAWGBK(C>0, RGB(0,108,108),RGB(88,0,0),0,'11',0);}
SHORT:=12;LONG:=26;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
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,1),COLORRED;

HJ_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ_3:=LLVBARS(MACD,HJ_2+20);
HJ_4:=IF(HJ_3>HJ_2,REF(MACD,HJ_3),0);
HJ_5:=MACD<0 AND MACD>HJ_4 AND LOW=LLV(LOW,HJ_2+20) AND HJ_4<0;
HJ_6:=REF(HJ_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_3)<0 AND MACD<0;

底背:DRAWLINE(HJ_4=HJ_3,MACD,HJ_6,MACD,0),COLORRED,DOTLINE;
DRAWICON(HJ_6,MACD*1.2,9);

HJ_7:=HHVBARS(MACD,HJ_2+20);
HJ_8:=IF(HJ_7>HJ_2,REF(MACD,HJ_7),0);
HJ_9:=MACD>0 AND MACD<HJ_8 AND HIGH=HHV(HIGH,HJ_2+20) AND HJ_8>0;
HJ_10:=REF(HJ_9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_7)>0;

顶背:DRAWLINE(HJ_8=HJ_7,MACD,HJ_10,MACD,0),COLOR1D7300,DOTLINE;
DRAWICON(HJ_10,MACD*1.2,15);

HJ_11:=CLOSE/MA(CLOSE,40)*100<78;
HJ_12:=CLOSE/MA(CLOSE,60)*100<74;
HJ_13:=HIGH>LOW*1.051;
HJ_14:=HJ_13 AND COUNT(HJ_13,5)>1;
HJ_15:=IF(HJ_14 AND (HJ_11 OR HJ_12),2,0);
HJ_16:=CLOSE/REF(CLOSE,25)<=1.1;
HJ_17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
HJ_18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
HJ_19:=SMA(HJ_18,2,1);
HJ_20:=SMA(HJ_19,2,1);
HJ_21:=IF(HJ_19>REF(HJ_19,1) AND REF(HJ_19,1)<REF(HJ_19,2) AND HJ_19<23,1.5,0);


HJ_22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
HJ_23:=MA(CLOSE,5);
HJ_24:=IF(CLOSE>SAR(10,2,20),1,0);
HJ_25:=IF(CLOSE<SAR(10,2,20),(-1),0);
HJ_26:=ATAN((HJ_23/REF(HJ_23,1)-1)*100)*180/3.1416;
HJ_27:=IF(HJ_26>30,1,0);
HJ_28:=IF(HJ_26<(-30),(-1),0);
HJ_29:=HJ_24+HJ_27+HJ_25+HJ_28;
IF(HJ_29<(-1) OR HJ_22<25.01,DIF,DRAWNULL),COLOR1D7300;
IF(HJ_22>74.989998 OR HJ_29>0,DIF,DRAWNULL),COLORRED;


0,COLORBROWN,POINTDOT;



金叉:=CROSS(DIF,DEA);
逝世叉:=CROSS(DEA,DIF);

T金叉:=BARSLAST(金叉);
T逝世叉:=BARSLAST(逝世叉);
T金叉2:=SUMBARS(T金叉=0,2);
T逝世叉2:=SUMBARS(T逝世叉=0,2);
T下1:=HHVBARS(DIF,T金叉2);
T底1:=LLVBARS(DIF,T逝世叉2);
前下C:=HHV(C,T下1);
下C:=HHV(C,T金叉);
前低C:=LLV(C,T底1);
低C:=LLV(C,T逝世叉);
顶背1:=REF(C,1)>REF(C,T下1) AND REF(DIF,1)<REF(DIF,T下1) AND DIF>DEA AND DEA>0 AND DIF<REF(DIF,1);
DRAWTEXT(顶背1,DIF*1.02,'顶背'),COLOR00FF00;

底背1:=REF(C,1)<REF(C,T底1)AND REF(DIF,1)>REF(DIF,T底1) AND DIF<DEA AND DEA<0 AND DIF>REF(DIF,1);

DRAWTEXT(底背1,DIF/1.02,'底背'),COLORMAGENTA;
20211081323283446.png

20211081323724660.png



智能MACD.tn6 (8.59 KB, 下载次数: 0)







上一篇:不保证涨停,但买入一周后收益10%以上是经常的
下一篇:强势黄金眼主图优化(通达信公式 主图 测试图)
您需要登录后才可以回帖 登录 | 立即注册 用百度帐号登录

本版积分规则

首发之家社区成立于2011年3月,内容涉及3C家电、数码生活智能电视,股票软件,4K,体育,软件,教育,游戏等资源指标公式论坛。
  • 官方手机版

  • 抖音号

  • 商务合作

  • Powered by Discuz! X3.4 | Copyright © 2011-2021, Tencent Cloud. | 首发之家社区
  • |网站地图 | mp4d@qq.com|小黑屋|手机版|