统计分笔成交的最密集价位。
源码:
if datatype<>0 then begin
drawtext(islastbar,0,'只能运行在分笔周期!\n \n请切换到分笔周期!!'),align2;
exit;
end;
fv:=vol;
fc:=close;
fcp:=fc;
a:=sortpos(fcp,0,1,datacount);
fvmax:=0; fvmaxp:=1; fvtemp:=fv[fcp[1]];
if datacount>1 then begin
for i=2 to datacount do
if fc[fcp]=fc[fcp[i-1]] then fvtemp:=fvtemp+fv[fcp]
else begin
if fvmax<fvtemp then begin
fvmax:=fvtemp;
fvmaxp:=i-1;
end;
fvtemp:=fv[fcp];
end;
if fvmax<fvtemp then begin
fvmax:=fvtemp;
fvmaxp:=i-1;
end;
end;
价格:fc[fcp[fvmaxp]];
手数:fvmax;
占比:fvmax/dynainfo(8)*100;