查看完整版本: 请问我的这个三价线公式为什么显示成这样?

刀小 2007-2-7 22:02

请问我的这个三价线公式为什么显示成这样?

请问我的这个三价线公式为什么显示成这样?前几天还好好的,似乎是数据问题,有没有办法解决!

input:m(2,2,10000);  
if m<2 then exit;
up:=c>ref(c,1);
down:=c<ref(c,1);
fc:=close;
fo:=open;
a:=setlbound(up,1);
up[1]:=fc[1]>fo[1];
n:=m-1;
if up[n] then begin
  B4:=fc[n];
  B1:=fo[n];
  b3:=B1;
  B2:=B1;
  tbl:=1;
end else begin
  B4:=fo[n];
  B1:=fc[n];
  B2:=B4;
  B3:=B4;
  tbl:=0;
end;
tblcount:=1;
////////////////////////////////////
for i=n+1 to datacount do begin
  if tbl=1 then begin
    if up[i] then begin
      if fc[i]>B4 then begin
        tblcount:=tblcount+1;
        tblc[i]:=fc[i];
        tblo[i]:=B4;
        if tblcount>2 then begin
          tblcount:=3;
          B1:=B2;
          B2:=B3;
        end;
        B3:=B4;
        B4:=fc[i];
      end;
    end
    else if down[i] then begin
      if fc[i]<B1 then begin
        tblcount:=1;
        tblc[i]:=fc[i];
        tblo[i]:=B3;
        B1:=fc[i];
        B2:=B3;
        tbl:=0;
      end;
    end;
  end  else begin
    if down[i] then begin
      if fc[i]<B1 then begin
        tblcount:=tblcount+1;
        tblc[i]:=fc[i];
        tblo[i]:=B1;
        if tblcount>2 then begin
          tblcount:=3;
          B4:=B3;
          b3:=B2;
        end;
        B2:=B1;
        B1:=fc[i];
      end;
    end
    else if up[i] then begin
      if fc[i]>B4 then begin
        tblcount:=1;
        tblc[i]:=fc[i];
        tblo[i]:=B2;
        B4:=fc[i];
        B3:=B2;
        tbl:=1;
      end;
    end;
  end;
end;
stickline(tblc<>0 and up,tblc,tblo,7,1)colorred;
stickline(tblc<>0 and down,tblc,tblo,7,0),colorcyan;
ts:=barslast(tblc);
stickline(tblc=0 and ref(up,ts),ref(tblc,ts),ref(tblc,ts),3,1),colormagenta;
stickline(tblc=0 and ref(down,ts),ref(tblc,ts),ref(tblc,ts),3,1),colorblue;
cc:tblc,linethick0;
oo:tblo,linethick0;

刀小 2007-2-7 22:15

请问这个怎么解决

tom76 2007-2-16 14:39

在开头加入
tblc:=0;
tblo:=0;

股市小强强 2007-2-16 16:58

谢谢两位老师,新年快乐

股市小强强 2007-2-17 08:36

要过年了,提钱祝楼主春节快乐!

刀小 2007-3-10 23:59

[quote]原帖由 [i]tom76[/i] 于 2007-2-16 14:39 发表
在开头加入
tblc:=0;
tblo:=0; [/quote]谢谢!

xggs 2007-3-12 06:26

第29行有语法错误

qingyay 2008-4-14 15:48

同7楼的一样体温

qingyay 2008-4-14 15:48

提问

lg16c 2008-4-16 08:34

:bhuhhh: :angry:
页: [1]
查看完整版本: 请问我的这个三价线公式为什么显示成这样?