标准的宝塔线————股市骑兵编写c1:=c;o1:=o;
for i=1 to DATACOUNT do begin
if i=1 then begin
if c1[i]>o1[i] then begin
x[i]:=1;cc1[i]:=c1[i];oo1[i]:=o1[i];
end;else
if c1[i]<o1[i] then begin
x[i]:=4;cc4[i]:=c1[i];oo4[i]:=o1[i];
end;else begin
x[i]:=0;
cc1[i]:=c1[i];oo1[i]:=o1[i];
cc4[i]:=c1[i];oo4[i]:=o1[i];
end;end;
if i=2 then begin
if x[i-1]=1 or x[i-1]=0 then begin
if c1[i]>cc1[i-1] then begin
x[i]:=1;//阳
cc1[i]:=c1[i];oo1[i]:=cc1[i-1];
end;else
if c1[i]<oo1[i-1] then begin
x[i]:=3;//阳平下
cc1[i]:=cc1[i-1];oo1[i]:=oo1[i-1];
cc4[i]:=c1[i];oo4[i]:=oo1[i-1];
end;else begin
x[i]:=2;//阳平
cc1[i]:=cc1[i-1];oo1[i]:=c1[i];
end;end;
if x[i-1]=4 or x[i-1]=0 then begin
if c1[i]<cc4[i-1] then begin
x[i]:=4;//阴
cc4[i]:=c1[i];oo4[i]:=cc4[i-1];
end;else
if c1[i]>oo4[i-1] then begin
x[i]:=6;//阴平上
cc4[i]:=oo4[i-1];oo4[i]:=cc4[i-1];
cc1[i]:=c1[i];oo1[i]:=oo4[i-1];
end;else begin
x[i]:=5;//阴平
cc4[i]:=cc4[i-1];oo4[i]:=c1[i];
end;end;end;
if i>2 then begin
if x[i-1]=1 then begin
if c1[i]>cc1[i-1] then begin
x[i]:=1;
cc1[i]:=c1[i];oo1[i]:=cc1[i-1];
end;else
if c1[i]<oo1[i-1] then begin
x[i]:=3;
cc1[i]:=cc1[i-1];oo1[i]:=oo1[i-1];
cc4[i]:=c1[i];oo4[i]:=oo1[i-1];
end;else begin
x[i]:=2;
cc1[i]:=cc1[i-1];oo1[i]:=c1[i];
end;end;
if x[i-1]=2 then begin
if c1[i]>cc1[i-1] then begin
x[i]:=1;
cc1[i]:=c1[i];oo1[i]:=cc1[i-1];
end;else
if c1[i]<oo1[i-1] then begin
x[i]:=3;
cc1[i]:=cc1[i-1];oo1[i]:=oo1[i-1];
cc4[i]:=c1[i];oo4[i]:=oo1[i-1];
end;else begin
x[i]:=2;
cc1[i]:=cc1[i-1];oo1[i]:=c1[i];
end;end;
if x[i-1]=3 then begin
if c1[i]>oo1[i-1] then begin
x[i]:=6;
cc4[i]:=oo4[i-1];oo4[i]:=cc4[i-1];
cc1[i]:=c1[i];oo1[i]:=oo4[i-1];
end;else
if c1[i]<cc4[i-1] then begin
x[i]:=4;
cc4[i]:=c1[i];oo4[i]:=cc4[i-1];
end;else begin
x[i]:=5;
cc4[i]:=cc4[i-1];oo4[i]:=c1[i];
end;end;
if x[i-1]=4 then begin
if c1[i]<cc4[i-1] then begin
x[i]:=4;
cc4[i]:=c1[i];oo4[i]:=cc4[i-1];
end;else
if c1[i]>oo4[i-1] then begin
x[i]:=6;
cc4[i]:=oo4[i-1];oo4[i]:=cc4[i-1];
cc1[i]:=c1[i];oo1[i]:=oo4[i-1];
end;else begin
x[i]:=5;
cc4[i]:=cc4[i-1];oo4[i]:=c1[i];
end;end;
if x[i-1]=5 then begin
if c1[i]>oo4[i-1] then begin
x[i]:=6;
cc4[i]:=oo4[i-1];oo4[i]:=cc4[i-1];
cc1[i]:=c1[i];oo1[i]:=oo4[i-1];
end;else
if c1[i]<cc4[i-1] then begin
x[i]:=4;
cc4[i]:=c1[i];oo4[i]:=cc4[i-1];
end;else begin
x[i]:=5;
cc4[i]:=cc4[i-1];oo4[i]:=c1[i];
end;end;
if x[i-1]=6 then begin
if c1[i]<oo1[i-1] then begin
x[i]:=3;
cc1[i]:=cc1[i-1];oo1[i]:=oo1[i-1];
cc4[i]:=c1[i];oo4[i]:=oo1[i-1];
end;else
if c1[i]>cc1[i-1] then begin
x[i]:=1;
cc1[i]:=c1[i];oo1[i]:=cc1[i-1];
end;else begin
x[i]:=2;
cc1[i]:=cc1[i-1];oo1[i]:=c1[i];
end;end;
end;end;
STICKLINE(x and cc1>0 and oo1>0,cc1,oo1,7,1);
STICKLINE(x and cc4>0 and oo4>0,cc4,oo4,7,0);
x,LINETHICK0;