复制内容到剪贴板
代码:
input:n(5,2,1000);
mm:=INTPART(ma(c,n)*100);
hh:=INTPART(hhv(mm,30));
ll:=INTPART(llv(mm,30));
cc:=INTPART(c*100);
for i=datacount-50 to datacount do begin
jx[i]:=ll[i];
jd[i]:=hh[i];
tx[i]:=0;
td[i]:=0;
for j=ll[i] to hh[i] do begin
tt:=0;
for k=i-29 to i do begin
if mm[k]=j then tt:=tt+1;
end;
if j<=cc[i] then begin
if tt>=tx[i] then begin tx[i]:=tt; jx[i]:=j; end;
end;
if j>cc[i] then begin
if tt>td[i] then begin td[i]:=tt; jd[i]:=j; end;
end;
end;
end;
支撑:jx/100;
支撑次数:tx,linethick0;
阻力:jd/100;
阻力次数:td,linethick0;