个股资金副图公式[通达信]
2015-12-24 13:28:18点击:
该指标公式是从其他老师软件里提取出来的,分享给各位童鞋,老师的名字不记得了,还望老师不要怪罪,
喜欢的童鞋请拿去,不喜欢的请飘过。
{个股资金} 超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; TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0); N:=1; 净流入:=SUM(ABS(超B+大B+中B+小B),N)-SUM(ABS(超S+大S+中S+小S),N),COLORMAGENTA,NODRAW; 超大单:=SUM((ABS(超B)-ABS(超S)),N); 大单:=SUM(ABS(大B),N)-SUM(ABS(大S),N); 中单:=SUM(ABS(中B),N)-SUM(ABS(中S),N); 小单:=SUM(ABS(小B),N)-SUM(ABS(小S),N); DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW; 总流入比:=SUM((超B+大B+中B+小B),N)/SUM((超B+大B+中B+小B+超S+大S+中S+小S),N)*100,NODRAW; 总流出比:=SUM((超S+大S+中S+小S),N)/SUM((超B+大B+中B+小B+超S+大S+中S+小S),N)*100,NODRAW; 大宗进:=SUM(((超B)+(大B)),N),NODRAW; 大宗出:=SUM(((超S)+(大S)),N),NODRAW; 非大宗进:=SUM(((中B)+(小B)),N),NODRAW; 非大宗出:=SUM(((中S)+(小S)),N),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; 资金流向买:=(大宗进限制+非大宗进限制); 资金流向卖:=(大宗出限制+非大宗出限制); 流入比:=净流入*1000000/AMOUNT,COLORWHITE,NODRAW; 大宗净流入:=SUM(((超B+大B)-(超S+大S)),N),COLORYELLOW,NODRAW; 大宗流入比:=大宗净流入*1000000/AMOUNT,COLORCYAN,NODRAW; DRAWRECTREL(90,600,440,420,RGB(0,130,0)); DRAWRECTREL(90,585,440,435,RGB(0,145,0)); DRAWRECTREL(90,570,440,450,RGB(0,150,0)); DRAWRECTREL(90,555,440,465,RGB(0,165,0)); DRAWRECTREL(90,540,440,480,RGB(0,180,0)); DRAWRECTREL(90,525,440,495,RGB(0,195,0)); DRAWRECTREL(90,510,440,510,RGB(0,210,0)); DRAWRECTREL(90,600,90+CONST(总流入比*350/100),420,RGB(128,0,0)); DRAWRECTREL(90,585,90+CONST(总流入比*350/100),435,RGB(148,0,0)); DRAWRECTREL(90,570,90+CONST(总流入比*350/100),450,RGB(168,0,0)); DRAWRECTREL(90,555,90+CONST(总流入比*350/100),465,RGB(188,0,0)); DRAWRECTREL(90,540,90+CONST(总流入比*350/100),480,RGB(208,0,0)); DRAWRECTREL(90,525,90+CONST(总流入比*350/100),495,RGB(228,0,0)); DRAWRECTREL(90,510,90+CONST(总流入比*350/100),510,RGB(248,0,0)); DRAWRECTREL(90+CONST(总流入比*350/100),420,90+CONST(总流入比*350/100),600,RGB(128,0,0)); DRAWRECTREL(264.8,420,265.2,600,RGB(0,0,10)); DRAWRECTREL(90,419.5,440,420.3,RGB(0,0,10)); DRAWRECTREL(90,599.7,440,600.3,RGB(0,0,10)); DRAWRECTREL(89.8,0,90.2,1000,RGB(0,0,10)); DRAWRECTREL(439.8,0,440.2,1000,RGB(0,0,10)); DRAWTEXT_FIX(1,0.00,0.45,0,STRCAT(STRCAT(' ',CON2STR(资金流向买,2)),' ')),COLOR0000FF; DRAWTEXT_FIX(1,0.445,0.45,0,STRCAT(STRCAT(' ',CON2STR(资金流向卖,2)),' ')),COLOR00FF00; DRAWTEXT_FIX(1,0.09,0.20,0,STRCAT('买',STRCAT(CON2STR(总流入比,1),'%%'))),COLOR0000FF; DRAWTEXT_FIX(1,0.36,0.20,0,STRCAT('卖',STRCAT(CON2STR(总流出比,1),'%%'))),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)>0,0.22,0.25,0,STRCAT(' ',STRCAT(CON2STR(净流入,2),' '))),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)<0,0.22,0.25,0,STRCAT(' ',STRCAT(CON2STR(净流入,2),' '))),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)=0,0.22,0.25,0,STRCAT(' ',STRCAT(CON2STR(净流入,2),' '))),COLOR80FFFF; DRAWRECTREL(640,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),600,500,RGB(128,0,0)); DRAWRECTREL(635,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),605,500,RGB(148,0,0)); DRAWRECTREL(630,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),610,500,RGB(168,0,0)); DRAWRECTREL(625,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),615,500,RGB(188,0,0)); DRAWRECTREL(620,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),620,500,RGB(218,0,0)); DRAWRECTREL(600,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),640,CONST(500-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),RGB(128,0,0)); DRAWRECTREL(640,500,600,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(635,500,605,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,148,0)); DRAWRECTREL(630,500,610,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,168,0)); DRAWRECTREL(625,500,615,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,188,0)); DRAWRECTREL(620,500,620,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,218,0)); DRAWRECTREL(600,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),640,CONST(500+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(740,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),700,500,RGB(128,0,0)); DRAWRECTREL(735,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),705,500,RGB(148,0,0)); DRAWRECTREL(730,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),710,500,RGB(168,0,0)); DRAWRECTREL(725,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),715,500,RGB(188,0,0)); DRAWRECTREL(720,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),720,500,RGB(218,0,0)); DRAWRECTREL(700,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),740,CONST(500-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),RGB(128,0,0)); DRAWRECTREL(740,500,700,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(735,500,705,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,148,0)); DRAWRECTREL(730,500,710,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,168,0)); DRAWRECTREL(725,500,715,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,188,0)); DRAWRECTREL(720,500,720,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,218,0)); DRAWRECTREL(700,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),740,CONST(500+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(840,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),800,500,RGB(128,0,0)); DRAWRECTREL(835,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),805,500,RGB(148,0,0)); DRAWRECTREL(830,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),810,500,RGB(168,0,0)); DRAWRECTREL(825,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),815,500,RGB(188,0,0)); DRAWRECTREL(820,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),820,500,RGB(218,0,0)); DRAWRECTREL(800,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),840,CONST(500-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),RGB(128,0,0)); DRAWRECTREL(840,500,800,CONST(500+IF((中单)<0,(ABS(中单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(800,CONST(500+IF((中单)<0,(ABS(中单)*250/DAZHI),0)),840,CONST(500+IF((中单)<0,(ABS(中单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(940,CONST(500-IF((小单)>0,(ABS(小单)*250/DAZHI),0)),900,500,RGB(128,0,0)); DRAWRECTREL(900,CONST(500-IF((小单)>0,(ABS(小单)*250/DAZHI),0)),940,CONST(500-IF((小单)>0,(ABS(小单)*250/DAZHI),0)),RGB(128,0,0)); DRAWRECTREL(940,500,900,CONST(500+IF((小单)<0,(ABS(小单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(900,CONST(500+IF((小单)<0,(ABS(小单)*250/DAZHI),0)),940,CONST(500+IF((小单)<0,(ABS(小单)*250/DAZHI),0)),RGB(0,128,0)); DRAWRECTREL(599.8,0,600.2,1000,RGB(0,0,10)); DRAWRECTREL(639.8,0,640.2,1000,RGB(0,0,10)); DRAWRECTREL(699.8,0,700.2,1000,RGB(0,0,10)); DRAWRECTREL(739.8,0,740.2,1000,RGB(0,0,10)); DRAWRECTREL(799.8,0,800.2,1000,RGB(0,0,10)); DRAWRECTREL(839.8,0,840.2,1000,RGB(0,0,10)); DRAWRECTREL(899.8,0,900.2,1000,RGB(0,0,10)); DRAWRECTREL(939.8,0,940.2,1000,RGB(0,0,10)); DRAWRECTREL(0,0.00,1000,0.20,RGB(255,0,0)); DRAWRECTREL(600,499.8,940,500.2,RGB(255,0,0)); DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)>0,0.59,0.805,0,'超大单'),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)<0,0.59,0.805,0,'超大单'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)=0,0.59,0.805,0,'超大单'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)>0,0.70,0.805,0,'大单'),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)<0,0.70,0.805,0,'大单'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)=0,0.70,0.805,0,'大单'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)>0,0.80,0.805,0,'中单'),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)<0,0.80,0.805,0,'中单'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)=0,0.80,0.805,0,'中单'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)>0,0.90,0.805,0,'小单'),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)<0,0.90,0.805,0,'小单'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)=0,0.90,0.805,0,'小单'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)>0,0.59,0.1,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),' ')),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)=0,0.59,0.1,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),' ')),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)<0,0.59,0.1,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),' ')),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)>0,0.69,0.1,0,STRCAT(STRCAT(' ',CON2STR(大单,1)),' ')),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)<0,0.69,0.1,0,STRCAT(STRCAT(' ',CON2STR(大单,1)),' ')),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)=0,0.69,0.1,0,STRCAT(STRCAT(' ',CON2STR(大单,1)),' ')),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)>0,0.79,0.1,0,STRCAT(STRCAT(' ',CON2STR(中单,1)),' ')),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)<0,0.79,0.1,0,STRCAT(STRCAT(' ',CON2STR(中单,1)),' ')),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)=0,0.79,0.1,0,STRCAT(STRCAT(' ',CON2STR(中单,1)),' ')),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)>0,0.89,0.1,0,STRCAT(STRCAT(' ',CON2STR(小单,1)),' ')),COLOR0000FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)<0,0.89,0.1,0,STRCAT(STRCAT(' ',CON2STR(小单,1)),' ')),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)=0,0.89,0.1,0,STRCAT(STRCAT(' ',CON2STR(小单,1)),' ')),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR=1,0.018,0,0,STKNAME),COLOR80FFFF; DRAWTEXT_FIX(ISLASTBAR=1,0.12,0,0,CODE),COLOR0000FF;
- 上一篇:没有啦
- 下一篇:自用的成交量指标 2015/12/24