怎么显示今天的收盘价是在几日收盘价中的最高?
怎么显示今天的收盘价是在几日收盘价中的最高?比如说,我在K线图中看出今天收盘价是15日内收盘价的最高,这个15日用公式怎么求出来?
正确答案1:
hac:=0;
att1:=hac;
att2:=hac;
attc:=hac;
fc:=c*1;
attc:=fc;
att1:=1;
for i=datacount-1 downto datacount-200 do
begin
iffc<attc and att2=0 then att1:=att1+1;
iffc>attc then att2:=1;;
end;
n:att1;
正确答案2:
也可这样
cc:=if(barscount(c)=1,999999,c);
sumbars(ref(cc,1)-cc,0)-1;
页:
[1]