DRAWGBK((C> 0),STRIP(RGB(10,10,30),RGB(10,10,10),0));
{---------------------------------------------------------------------}
源码净 :="大额日线.主力#day";
特买:="大额日线.特买#day";
特卖:="大额日线.特卖#day";
大买:="大额日线.大买#day";
大卖:="大额日线.大卖#day";
中买:="大额日线.中买#day";
中卖:="大额日线.中卖#day";
小买:="大额日线.小买#day";
小卖:="大额日线.小卖#day";
超大买比:="大额日线.超大比#day";
大户买比:="大额日线.大户比#day";
中户买比:="大额日线.中户比#day";
散户买比:="大额日线.散户比#day";
★主力买比:="大额日线.主力比#day";
小净:=小买-小卖;
中净:=中买-中卖;
大净:=大买-大卖;
特净:=特买-特卖;
★主力买:=特买+大买;
★主力卖:=特卖+大卖;
总:=★主力买+★主力卖;
★主力净:=特净+大净;
JEDDX:=★主力净;
ZHDDX:=中净;
DHDDX:=大净;
JGDDX:=特净;
SHDDX:=小净;
DRAWRECTREL(-100,-200,0,1100,RGB(1,1,1)),LAYER1;
DRAWRECTREL(0,0,50,1100,RGB(1,1,1)),colorblack,LAYER1;
DRAWTEXTREL(10,100,'机构'),color990099;
DRAWTEXTREL(10,350,'大户'),colorred;
DRAWTEXTREL(10,600,'中户'),coloryellow;
DRAWTEXTREL(10,850,'散户'),colorcyan;
DRAWFLAGTEXT(1,0,'机构'+STR(P2)+'日累加:'+str(sum(JGDDX,P2))+'手'),COLORWHITE;
DRAWFLAGTEXT(1,0,'大户'+STR(P3)+'日累加:'+str(sum(DHDDX,P3))+'手'),COLORYELLOW;
DRAWFLAGTEXT(1,0,'中户'+STR(P4)+'日累加:'+str(sum(ZHDDX,P4))+'手'),COLORffaa00;
DRAWFLAGTEXT(1,0,'散户'+STR(P4)+'日累加:'+str(sum(SHDDX,P4))+'手'),COLORGREEN;
DRAWFLAGTEXT(1,0,'净额:'+STR(P4)+'日累加:'+str(sum(JEDDX,P4))+'手'),Color825BFF;
机构:JGDDX,colorwhite,LINETHICK0;
大户:DHDDX,coloryellow,LINETHICK0;
中户:ZHDDX,colorffaa00,LINETHICK0;
散户:SHDDX,colorgreen,LINETHICK0;
特大连红天数:last(JGDDX>0),Colorwhite,LINETHICK0;
大单连红天数:last(DHDDX>0),coloryellow,LINETHICK0;
小单连绿天数:last(shDDX<0),colorgreen,LINETHICK0;
D:=max(HHVALL(JGDDX),HHVALL(DHDDX),HHVALL(ZHDDX),HHVALL(SHDDX),ABS(LLVALL(JGDDX)),ABS(LLVALL(DHDDX)),ABS(LLVALL(ZHDDX)),ABS(LLVALL(SHDDX)));
STICKLINE(JGDDX>0,4*D,4*D+JGDDX,6,0),Color6D40FF;
STICKLINE(JGDDX>0,4*D,4*D+JGDDX,4,0),Color825BFF;
STICKLINE(JGDDX>0,4*D,4*D+JGDDX,3,0),Color9C7DFF;
STICKLINE(JGDDX>0,4*D,4*D+JGDDX,1,0),ColorB9A3FF;
STICKLINE(JGDDX<0,4*D,4*D+JGDDX,6,0),ColorFF9900;
STICKLINE(JGDDX<0,4*D,4*D+JGDDX,4,0),ColorFFBB00;
STICKLINE(JGDDX<0,4*D,4*D+JGDDX,3,0),ColorFFDD00;
STICKLINE(JGDDX<0,4*D,4*D+JGDDX,1,0),ColorFFFF00;
STICKLINE(JGDDX=0,4*D,4*D,12,0),COLOR444444;
STICKLINE(DHDDX>0,2*D,2*D+DHDDX,6,0),Color6D40FF;
STICKLINE(DHDDX>0,2*D,2*D+DHDDX,4,0),Color825BFF;
STICKLINE(DHDDX>0,2*D,2*D+DHDDX,3,0),Color9C7DFF;
STICKLINE(DHDDX>0,2*D,2*D+DHDDX,1,0),ColorB9A3FF;
STICKLINE(DHDDX<0,2*D,2*D+DHDDX,6,0),ColorFF9900;
STICKLINE(DHDDX<0,2*D,2*D+DHDDX,4,0),ColorFFBB00;
STICKLINE(DHDDX<0,2*D,2*D+DHDDX,3,0),ColorFFDD00;
STICKLINE(DHDDX<0,2*D,2*D+DHDDX,1,0),ColorFFFF00;
STICKLINE(DHDDX=0,2*D,2*D,12,0),COLOR444444;
STICKLINE(ZHDDX>0,0,ZHDDX,6,0),Color6D40FF;
STICKLINE(ZHDDX>0,0,ZHDDX,4,0),Color825BFF;
STICKLINE(ZHDDX>0,0,ZHDDX,3,0),Color9C7DFF;
STICKLINE(ZHDDX>0,0,ZHDDX,1,0),ColorB9A3FF;
STICKLINE(ZHDDX<0,0,ZHDDX,6,0),ColorFF9900;
STICKLINE(ZHDDX<0,0,ZHDDX,4,0),ColorFFBB00;
STICKLINE(ZHDDX<0,0,ZHDDX,3,0),ColorFFDD00;
STICKLINE(ZHDDX<0,0,ZHDDX,1,0),ColorFFFF00;
STICKLINE(ZHDDX=0,0,0,12,0),COLOR444444;
STICKLINE(shdDx>0,-2*D,SHDDX-2*D,6,0),Color6D40FF;
STICKLINE(shddx>0,-2*D,SHDDX-2*D,4,0),Color825BFF;
STICKLINE(shddx>0,-2*D,SHDDX-2*D,3,0),Color9C7DFF;
STICKLINE(shddx>0,-2*D,SHDDX-2*D,1,0),ColorB9A3FF;
STICKLINE(shddx<0,-2*D,SHDDX-2*D,6,0),ColorFF9900;
STICKLINE(shddx<0,-2*D,SHDDX-2*D,4,0),ColorFFBB00;
STICKLINE(shddx<0,-2*D,SHDDX-2*D,3,0),ColorFFDD00;
STICKLINE(shddx<0,-2*D,SHDDX-2*D,1,0),ColorFFFF00;
STICKLINE(SHDDX=0,-2*D,-2*D,12,0),COLOR444444;
-----------------------------------------------------------------------------------------------------------
{大额日线}
REFLINE:0,20,40,60;
Chb:=sum(AMOUNT*bigorder(1,3),1);
Dhb:=sum(AMOUNT*(bigorder(1,2)-bigorder(1,3)),1);
Zhb:=sum(AMOUNT*(bigorder(1,1)-bigorder(1,2)),1);
Xhb:=sum(AMOUNT*(1-bigorder(1,1)),1);
Hj:=chb+dhb+zhb+xhb;
Chs:=sum(AMOUNT*bigorder(2,3),01);
Dhs:=sum(AMOUNT*(bigorder(2,2)-bigorder(2,3)),01);
Zhs:=sum(AMOUNT*(bigorder(2,1)-bigorder(2,2)),01);
Xhs:=sum(AMOUNT*(1-bigorder(2,1)),01);
hjs:=chs+dhs+zhs+xhs;
chbb:=chb/hj;
dhbb:=dhb/hj;
zhbb:=zhb/hj;
xhbb:=xhb/hj;
xhj:=(xhb-xhs)/10000;
zhj:=(zhb-zhs)/10000;
dhj:=(dhb-dhs)/10000;
chj:=(chb-chs)/10000;
流入:=chj+dhj;
超大:=chb/hj*100;
大户:=dhb/hj*100;
中户:=zhb/hj*100;
散户:=xhb/hj*100;
主力A:=超大+大户;
{超赢特大}
特买A:MA(chb/10000,1),linethick0;
特卖A:MA(chs/10000,1),linethick0;
{超赢大户持仓}
大买A:MA(dhb/10000,1),linethick0;
大卖A:MA(dhs/10000,1),linethick0;
{超赢中户@}
中买A:MA(zhb/10000,1),linethick0;
中卖A:MA(zhs/10000,1),linethick0;
{超赢散户&}
小买A:MA(xhb/10000,1),linethick0;
小卖A:MA(xhs/10000,1),linethick0;
{大额日线}
特买:特买A,LINETHICK7,COLORred;
特卖:特卖A,LINETHICK7,COLORgreen;
大买:大买A,LINETHICK5,COLORred;
大卖:大卖A,LINETHICK5,COLORgreen;
中买:中买A,LINETHICK3,COLORred;
中卖:中卖A,LINETHICK3,COLORgreen;
小买:小买A,LINETHICK1,COLORred;
小卖:小卖A,LINETHICK1,COLORgreen;
主力:主力A,Color00ffff;
超大比:超大;
大户比:大户;
中户比:中户;
散户比:散户;
主力比:主力A;