通达信攻击比(红)攻击流量源码

[复制链接]
查看99 | 回复0 | 2021-8-21 11:49:39 | 显示全部楼层 |阅读模式

以下是通达信攻击比(红)攻击流量源码(无源码的请下载附件导入)

资金流入:=SUM(IF(C>REF(C,1),C*V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),C*V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
 DRAWBAND(资金出入,RGB(200,50,200),0,RGB(0,100,0));
资金流量:资金出入,COLORFFFFFF,LINETHICK1;
资金比(黄):资金出入/SUM(V,FROMOPEN),COLOR00FFFF,LINETHICK1;
攻击量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
攻击量A:=SUM(IF(C>REF(C,1),攻击量*C*V*10,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*C*V*10,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:攻击量A+攻击量B,COLORSTICK;
攻击流量线:攻击流量,COLORYELLOW,LINETHICK1;
攻击比(红):攻击流量/SUM(V,FROMOPEN),COLORRED,LINETHICK1;
 {STICKLINE(资金流量A>0,资金流量A,0,1,0),COLOR0000FF;
 STICKLINE(资金流量B<0,资金流量B,0,1,0),COLORFF0000;}
 BGTYU:=IF(DATE<=1150530,1,0);
 GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);
 VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))));
二十☆:=EXPMA((DCLOSE/VBNH),20),COLORRED,LINETHICK1;
六十★:=EXPMA((DCLOSE/VBNH),60),COLORLIGREEN,LINETHICK1;
 DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/VBNH),120)),EXPMA((DCLOSE/VBNH),60)*1,1);
 DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),1,18);
 0,POINTDOT;

657511601.jpg

657511601.jpg

相关帖子

回复

使用道具 举报

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

本版积分规则