通达信资金买卖流向副图指标 源码分享 附图

N:=10;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S);
超大单:=(超B)-(超S);
大单:=(大B)-(大S);
中单:=(中B)-(中S);
小单:=(小B)-(小S);
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
近N净入:=SUM(净流入,N);
近N超:=SUM(超大单,N);
近N大:=SUM(大单,N);
近N中:=SUM(中单,N),;
近N小:=SUM(小单,N);
流入:=ABS(超B+大B+中B+小B)*1000/VOL;
流出:=ABS(超S+大S+中S+小S)*1000/VOL;
近N流入:=ABS(SUM(超B,N)+SUM(大B,N)+SUM(中B,N)+SUM(小B,N))*1000/VOL;
近N流出:=ABS(SUM(超S,N)+SUM(大S,N)+SUM(中S,N)+SUM(小S,N))*1000/VOL;
净流买比N:=近N流入*100/(近N流入+近N流出);
AAS:=CONST(MAX(ABS(流入),ABS(流出)))*4,NODRAW;
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
大宗进限制:=IF((超B+大B)=0,0,大宗进),NODRAW;
大宗出限制:=IF((超S+大S)=0,0,大宗出),NODRAW;
非大宗进限制:=IF(中B+小B=0,0,非大宗进),NODRAW;
非大宗出限制:=IF(中S+小S=0,0,非大宗出),NODRAW;
资金流向买:=大宗进限制+非大宗进限制;
资金流向卖:=大宗出限制+非大宗出限制;
近N资金流向买:=SUM(资金流向买,N);
近N资金流向卖:=SUM(资金流向卖,N);
{ 当日 }
DRAWRECTREL(0,0,990,999.2,IF(120,RGB(10,0,0),0));
DRAWRECTREL(50,255,950,195,RGB(0,140,0));
DRAWRECTREL(50,245,950,205,RGB(0,160,0));
DRAWRECTREL(50,235,950,215,RGB(0,180,0));
DRAWRECTREL(50,225,950,225,RGB(0,210,0));
DRAWRECTREL(50,255,50+CONST(净流买比N*900/100),195,RGB(140,0,0));
DRAWRECTREL(50,245,50+CONST(净流买比N*900/100),205,RGB(160,0,0));
DRAWRECTREL(50,235,50+CONST(净流买比N*900/100),215,RGB(180,0,0));
DRAWRECTREL(50,225,50+CONST(净流买比N*900/100),225,RGB(210,0,0));
DRAWTEXT_FIX(1,0.05,0.01,0,STRCAT(STRCAT('净流买比',CON2STR(净流买比N,2)),'%')),COLORYELLOW;
DRAWRECTREL(500,255,500,195,RGB(250,250,0));

DRAWRECTREL(60,CONST(700-IF((近N超)>0,(ABS(近N超)*250/DAZHI),0)),200,700,RGB(128,0,0));
DRAWRECTREL(60,700,200,CONST(700+IF((近N超)<0,(ABS(近N超)*250/DAZHI),0)),RGB(0,128,0));

DRAWRECTREL(300,CONST(700-IF((近N大)>0,(ABS(近N大)*250/DAZHI),0)),430,700,RGB(128,0,0));
DRAWRECTREL(300,700,430,CONST(700+IF((近N大)<0,(ABS(近N大)*250/DAZHI),0)),RGB(0,128,0));

DRAWRECTREL(600,CONST(700-IF((近N中)>0,(ABS(近N中)*250/DAZHI),0)),730,700,RGB(128,0,0));
DRAWRECTREL(600,700,730,CONST(700+IF((近N中)<0,(ABS(近N中)*250/DAZHI),0)),RGB(0,128,0));

DRAWRECTREL(820,CONST(700-IF((近N小)>0,(ABS(近N小)*250/DAZHI),0)),950,700,RGB(128,0,0));
DRAWRECTREL(820,700,950,CONST(700+IF((近N小)<0,(ABS(近N小)*250/DAZHI),0)),RGB(0,128,0));

DRAWRECTREL(60,699.8,950,700.2,RGB(255,0,0));
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)>0,0.05,0.900,0,'超大单'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)<0,0.05,0.900,0,'超大单'),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)=0,0.05,0.900,0,'超大单'),COLOR80FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)>0,0.35,0.900,0,'大单'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)<0,0.35,0.900,0,'大单'),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)=0,0.35,0.900,0,'大单'),COLOR80FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)>0,0.60,0.900,0,'中单'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)<0,0.60,0.900,0,'中单'),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)=0,0.60,0.900,0,'中单'),COLOR80FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)>0,0.85,0.900,0,'小单'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)<0,0.85,0.900,0,'小单'),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)=0,0.85,0.900,0,'小单'),COLOR80FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)>0,0.03,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N超,1)),'万')),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)<0,0.03,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N超,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N超)=0,0.03,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N超,1)),' ')),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)>0,0.25,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N大,1)),'万')),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)<0,0.25,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N大,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N大)=0,0.25,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N大,1)),' ')),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)>0,0.55,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N中,1)),'万')),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)<0,0.55,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N中,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N中)=0,0.55,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N中,1)),' ')),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)>0,0.80,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N小,1)),'万')),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)<0,0.80,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N小,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N小)=0,0.80,0.5,0,STRCAT(STRCAT(' ',CON2STR(近N小,1)),' ')),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N净入)>0,0.93,0.01,1,STRCAT('10日净买: ',STRCAT(CON2STR(近N净入,1),'万'))) COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N净入)<0,0.93,0.01,1,STRCAT('10日净买: ',STRCAT(CON2STR(近N净入,1),'万'))) COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(近N净入)=0,0.90,0.01,1,STRCAT('10日净买: ',STRCAT(CON2STR(近N净入,1),'万'))) COLOR80FFFF;

DRAWTEXT_FIX(1,0.05,0.12,0,STRCAT(STRCAT('买入额:',CON2STR(近N资金流向买,1)),'万')),COLOR0000FF;
DRAWTEXT_FIX(1,0.50,0.12,0,STRCAT(STRCAT('卖出额:',CON2STR(近N资金流向卖,1)),'万')),COLOR00FF00;



来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图