{主力持仓};
HS:=vol/capital;
DD1:=BIGORDER(1,2)-BIGORDER(2,2);
DT1:=HS*DD1*100;
主力持仓:=50+Sum(DT1,0);
三日1:=SUM(主力持仓,3);
五日1:=SUM(主力持仓,5);
十日1:=SUM(主力持仓,10);
当日增减度1:= DT1;
{机构持仓};
DD2:=BIGORDER(1,3)-BIGORDER(2,3);
DT2:=HS*DD2*100;
机构持仓:= Sum(DT2,0);
三日2:=SUM(机构持仓,3);
五日2:=SUM(机构持仓,5);
十日2:=SUM(机构持仓,10);
当日增减度2:= DT2;
DD:=DD1+DD2;
DT:=DT1+DT2;
综合持仓:(主力持仓+机构持仓),linethick1;
三日:=三日1+三日2;
五日:=五日1+五日2;
十日:=十日1+十日2;
当日增减度:= DT1+DT2;
STICKLINE(DT>0, 综合持仓, 综合持仓+DT,5,0),COLORRed;
STICKLine(DT<0, 综合持仓+DT, 综合持仓,5,0),COLORGreen;
当日成交 := (DT * capital) * DYNAINFO(11)/10000;
买入手数 := (capital*DT)/100;
if (当日成交>=0) then
begin
Str1:= '净买'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净买'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '增减度' + NUMTOSTRN(DT,3);
end;
if 当日成交<0 then
begin
Str1:= '净卖'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净卖'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '增减度' + NUMTOSTRN(DT,3);
end;
DRAWFLAGTEXT(DT>=0,综合持仓,Str1+str2+str3),COLORRED;
DRAWFLAGTEXT(DT<0,综合持仓,Str1+str2+str3),COLORGREEN;