A:=LARGEINTRDVOL*10000/FINANCE(7);
B:=LARGEOUTTRDVOL*10000/FINANCE(7);
A1:=SUM(A,3);
B1:=SUM(B,3);
A2:DMA(A1,21);
B2:DMA(B1,21);
DRAWBAND(A2,RGB(255,0,0),B2,RGB(0,30,200));
H1:HHV(A2,8);
STICKLINE(A2-H1<0,H1,A2,0,-1);
H2:CONST(REF(H1,5)),DOTLINE;
H4:CONST(REF(H1,20)),COLORLIGRAY,DOTLINE;
DRAWBAND(A2,65,H2,RGB(30,0,80));
DRAWBAND(A2,255,B2,RGB(0,210,250));
机构:(L2_VOL(0,0) - L2_VOL(0,1))*10000/FINANCE(7),NODRAW,COLORRED;
大户:(L2_VOL(1,0) - L2_VOL(1,1))*10000/FINANCE(7),NODRAW,COLORMAGENTA;
中户:(L2_VOL(2,0) - L2_VOL(2,1))*10000/FINANCE(7),NODRAW,COLORLIGREEN;
散户:(L2_VOL(3,0) - L2_VOL(3,1))*10000/FINANCE(7),NODRAW,COLORLIGRAY;
DRAWICON(H2<H4 AND CROSS(A2,H2) AND A2>B2,H2,0);
IF(H2>H4,1,0);
DRAWICON(H2>H4 AND CROSS(A2,H4) AND A2>B2,H4,0);
DRAWICON(FILTER(A2=HHV(A2,23),1),A2,0);
DRAWICON(FILTER(B2=LLV(B2,23),2),B2,0);
特大单:=(L2_AMO(0,2)/10000.0)+(-L2_AMO(0,3)/10000.0);
大单:=(L2_AMO(1,2)/10000.0)+(-L2_AMO(1,3)/10000.0);
中单:=(L2_AMO(2,2)/10000.0)+(-L2_AMO(2,3)/10000.0);
小单:=(L2_AMO(3,2)/10000.0)+(-L2_AMO(3,3)/10000.0);
主力:特大单+大单,NODRAW,COLOR666666;
STICKLINE(主力>0,H2,H2+主力,3.9,1)COLORYELLOW;
STICKLINE(主力<0,H2,H2+(主力),3.9,1)COLORLIBLUE;
KK:=机构+大户+中户+散户;
五日主力:SUM(主力,5),COLORRED;
STICKLINE(特大单>0,H2,H2+2*(ABS(小单)+ABS(中单)+ABS(大单)+ABS(特大单)),2.5,0),COLORRED;
STICKLINE(特大单<0,H2,H2+2*(ABS(小单)+ABS(中单)+ABS(大单)+ABS(特大单)),2.5,0),COLORBLUE;
STICKLINE(大单>0,H2,H2+2*(ABS(小单)+ABS(中单)+ABS(大单)),2.5,0),COLORLIMAGENTA;
STICKLINE(大单<0,H2,H2+2*(ABS(小单)+ABS(中单)+ABS(大单)),2.5,0),COLORGREEN;
STICKLINE(中单>0,H2,H2+2*(ABS(小单)+ABS(中单)),2.5,0),COLORLIRED;
STICKLINE(中单<0,H2,H2+2*(ABS(小单)+ABS(中单)),2.5,0),COLORLIGREEN;
STICKLINE(小单>0,H2,H2+2*小单,2.5,0),COLORLIGRAY;
STICKLINE(小单<0,H2,H2+2*ABS(小单),2.5,0),COLORLIBLUE;
{STICKLINE(大单>0,H2,H2+大单*3,1,0),COLORMAGENTA;
STICKLINE(大单<0,H2,H2+ABS(大单)*3,1,0),COLORGREEN;
STICKLINE(特大单>0,H2,H2+特大单*3,1,0),COLORRED;
STICKLINE(特大单<0,H2,H2+ABS(特大单)*3,1,0),COLORCYAN;}
{DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0,0.001,0,'单位(万元)'),COLORDDDDDD;}
{ 当日 }
DRAWRECTREL(0,0,260,999.2,IF(120,RGB(10,0,0),0));
DRAWRECTREL(0,0,209,999.2,IF(120,RGB(10,0,0),0));
{资金明细}
净流入:=特大单+大单+中单+小单;
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(特大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.040,0.9,0,'超 大'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.085,0.9,0,'大 单'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.129,0.9,0,'中 单'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.175,0.9,0,'小 单'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.216,0.9,0,'单日净流入'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.224,0.2,0,'【万】'),COLORWHITE;
DRAWRECTREL(30,ABS(CONST(880-(ABS(特大单)*280/DAZHI))),65,880,IF(CONST(特大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(75,ABS(CONST(880-(ABS(大单)*280/DAZHI))),110,880,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(120,ABS(CONST(880-(ABS(中单)*280/DAZHI))),155,880,IF(CONST(中单)>0,RGB(240,130,140),RGB(23,125,255)));
DRAWRECTREL(165,ABS(CONST(880-(ABS(小单)*280/DAZHI))),200,880,IF(CONST(小单)>0,RGB(240,130,140),RGB(23,125,255)));
DRAWRECTREL(219,ABS(CONST(880-(ABS(净流入)*280/DAZHI))),251,880,IF(CONST(净流入)>0,RGB(170,0,170),RGB(0,155,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)>0,0.22,0.07,0,STRCAT(STRCAT(' ',CON2STR(净流入,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)<0,0.22,0.07,0,STRCAT(STRCAT(' ',CON2STR(净流入,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)=0,0.22,0.07,0,STRCAT(STRCAT(' ',CON2STR(净流入,1)),' ')),COLORYELLOW;
超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;
N:=10;
N2:=5;
N3:=3;
N4:=1;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.02,1,'十 日:'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.15,1,'五 日:'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.29,1,'三 日:'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.43,1,'单 日:'),COLORWHITE;
{十日}
特大单1:=SUM(ABS(超B),N)-SUM(ABS(超S),N);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单1)>0,0.031,0.07,0,STRCAT(STRCAT(' ',CON2STR(特大单1,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单1)<0,0.031,0.07,0,STRCAT(STRCAT(' ',CON2STR(特大单1,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单1)=0,0.031,0.07,0,STRCAT(STRCAT(' ',CON2STR(特大单1,1)),' ')),COLORYELLOW;
大单2:=SUM(ABS(大B),N)-SUM(ABS(大S),N);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单2)>0,0.076,0.07,0,STRCAT(STRCAT(' ',CON2STR(大单2,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单2)<0,0.076,0.07,0,STRCAT(STRCAT(' ',CON2STR(大单2,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单2)=0,0.076,0.07,0,STRCAT(STRCAT(' ',CON2STR(大单2,1)),' ')),COLORYELLOW;
中D:=SUM(ABS(中B),N)-SUM(ABS(中S),N);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D)>0,0.121,0.07,0,STRCAT(STRCAT(' ',CON2STR(中D,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D)<0,0.121,0.07,0,STRCAT(STRCAT(' ',CON2STR(中D,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D)=0,0.121,0.07,0,STRCAT(STRCAT(' ',CON2STR(中D,1)),' ')),COLORYELLOW;
小D:=SUM(ABS(小B),N)-SUM(ABS(小S),N);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D)>0,0.166,0.07,0,STRCAT(STRCAT(' ',CON2STR(小D,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D)<0,0.166,0.07,0,STRCAT(STRCAT(' ',CON2STR(小D,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D)=0,0.166,0.07,0,STRCAT(STRCAT(' ',CON2STR(小D,1)),' ')),COLORYELLOW;
特大单2:=SUM(ABS(超B),N2)-SUM(ABS(超S),N2);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单2)>0,0.031,0.2,0,STRCAT(STRCAT(' ',CON2STR(特大单2,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单2)<0,0.031,0.2,0,STRCAT(STRCAT(' ',CON2STR(特大单2,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单2)=0,0.031,0.2,0,STRCAT(STRCAT(' ',CON2STR(特大单2,1)),' ')),COLORYELLOW;
大单3:=SUM(ABS(大B),N2)-SUM(ABS(大S),N2);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单3)>0,0.076,0.2,0,STRCAT(STRCAT(' ',CON2STR(大单3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单3)<0,0.076,0.2,0,STRCAT(STRCAT(' ',CON2STR(大单3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单3)=0,0.076,0.2,0,STRCAT(STRCAT(' ',CON2STR(大单3,1)),' ')),COLORYELLOW;
中D2:=SUM(ABS(中B),N2)-SUM(ABS(中S),N2);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D2)>0,0.121,0.2,0,STRCAT(STRCAT(' ',CON2STR(中D2,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D2)<0,0.121,0.2,0,STRCAT(STRCAT(' ',CON2STR(中D2,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D2)=0,0.121,0.2,0,STRCAT(STRCAT(' ',CON2STR(中D2,1)),' ')),COLORYELLOW;
小D2:=SUM(ABS(小B),N2)-SUM(ABS(小S),N2);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D2)>0,0.166,0.2,0,STRCAT(STRCAT(' ',CON2STR(小D2,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D2)<0,0.166,0.2,0,STRCAT(STRCAT(' ',CON2STR(小D2,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D2)=0,0.166,0.2,0,STRCAT(STRCAT(' ',CON2STR(小D2,1)),' ')),COLORYELLOW;
{三日}
特大单3:=SUM(ABS(超B),N3)-SUM(ABS(超S),N3);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单3)>0,0.031,0.34,0,STRCAT(STRCAT(' ',CON2STR(特大单3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单3)<0,0.031,0.34,0,STRCAT(STRCAT(' ',CON2STR(特大单3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单3)=0,0.031,0.34,0,STRCAT(STRCAT(' ',CON2STR(特大单3,1)),' ')),COLORYELLOW;
大单4:=SUM(ABS(大B),N3)-SUM(ABS(大S),N3);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单4)>0,0.076,0.34,0,STRCAT(STRCAT(' ',CON2STR(大单4,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单4)<0,0.076,0.34,0,STRCAT(STRCAT(' ',CON2STR(大单4,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单4)=0,0.076,0.34,0,STRCAT(STRCAT(' ',CON2STR(大单4,1)),' ')),COLORYELLOW;
中D3:=SUM(ABS(中B),N3)-SUM(ABS(中S),N3);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D3)>0,0.121,0.34,0,STRCAT(STRCAT(' ',CON2STR(中D3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D3)<0,0.121,0.34,0,STRCAT(STRCAT(' ',CON2STR(中D3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D3)=0,0.121,0.34,0,STRCAT(STRCAT(' ',CON2STR(中D3,1)),' ')),COLORYELLOW;
小D3:=SUM(ABS(小B),N3)-SUM(ABS(小S),N3);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D3)>0,0.166,0.34,0,STRCAT(STRCAT(' ',CON2STR(小D3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D3)<0,0.166,0.34,0,STRCAT(STRCAT(' ',CON2STR(小D3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D3)=0,0.166,0.34,0,STRCAT(STRCAT(' ',CON2STR(小D3,1)),' ')),COLORYELLOW;
{一日}
特大单4:=SUM(ABS(超B),N4)-SUM(ABS(超S),N4);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单4)>0,0.031,0.48,0,STRCAT(STRCAT(' ',CON2STR(特大单4,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单4)<0,0.031,0.48,0,STRCAT(STRCAT(' ',CON2STR(特大单4,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单4)=0,0.031,0.48,0,STRCAT(STRCAT(' ',CON2STR(特大单4,1)),' ')),COLORYELLOW;
大单5:=SUM(ABS(大B),N4)-SUM(ABS(大S),N4);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单5)>0,0.076,0.48,0,STRCAT(STRCAT(' ',CON2STR(大单5,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单5)<0,0.076,0.48,0,STRCAT(STRCAT(' ',CON2STR(大单5,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单5)=0,0.076,0.48,0,STRCAT(STRCAT(' ',CON2STR(大单5,1)),' ')),COLORYELLOW;
中D4:=SUM(ABS(中B),N4)-SUM(ABS(中S),N4);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D4)>0,0.121,0.48,0,STRCAT(STRCAT(' ',CON2STR(中D4,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D4)<0,0.121,0.48,0,STRCAT(STRCAT(' ',CON2STR(中D4,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中D4)=0,0.121,0.48,0,STRCAT(STRCAT(' ',CON2STR(中D4,1)),' ')),COLORYELLOW;
小D4:=SUM(ABS(小B),N4)-SUM(ABS(小S),N4);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D4)>0,0.166,0.48,0,STRCAT(STRCAT(' ',CON2STR(小D4,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D4)<0,0.166,0.48,0,STRCAT(STRCAT(' ',CON2STR(小D4,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小D4)=0,0.166,0.48,0,STRCAT(STRCAT(' ',CON2STR(小D4,1)),' ')),COLORYELLOW;