我有一在飞狐软件下正常使用的指标公式,当转移到金字塔下,在公式编辑器里进行“公式测试”时显示正常,但在K线图窗口下使用不能显示!有错误提示为:数组越界操作。烦请“版主专家”帮助解决改写使之能正常使用。公式代码如下:
INPUT:N(10,1,100);
fc:=c;fo:=o;cc:0*c,LINETHICK0;oo:0*c,LINETHICK0;t1:=0*c;t2:=0*c;
for i=1 to datacount do begin
if i=1 and fc[i]>fo[i] then
cc[i]:=fc[i];
oo[i]:=fc[i];
if i=1 and fc[i]<fo[i] then
cc[i]:=fc[i];
oo[i]:=fc[i];
if i>1 then
cc[i]:=cc[i-1];
oo[i]:=oo[i-1];
if i>1 and fc[i]>cc[i]*(1+n/100) then begin
cc[i]:=cc[i-1]*(1+n/100);
oo[i]:=cc[i-1];
end;
if i>1 and fc[i]<oo[i]/(1+n/100) then begin
oo[i]:=oo[i-1]/(1+n/100);
cc[i]:=oo[i-1];
end;
if oo[i]=oo[i-1] then
t1[i]:=t1[i-1]+1;
if cc[i]=cc[i-1] then
t2[i]:=t2[i-1]+1;
end;
o1:=ref(oo,t1+1);
c1:=ref(cc,t2+1);
STICKLINE(c1=oo,cc,oo,8,1)COLORRED;
STICKLINE(o1=cc,cc,oo,8,1)COLORCYAN;
我这里1.992beta 系统 xpsp3 和 vista 均正常