--
if (CS<CS1 or (nBE>=nBE1+0.4)) then begin//排名上升,上升一个区间
if tholding2>-e then begin
if tholding2<e then begin
if not(TORDERPRICE(4,1)=BE) then sc:=0;
if not(TORDERPRICE(1,1)=BE) then bo:=0;
if tholding2>=0 then begin
if tsellholding(1)>0 then begin//加了限制
if sc=0 then tsellshort(close-nBE>m,1,lmt,BE);
sc:=1;bo:=1;
end
if tsellholding(1)=0 then begin
if bo=0 then tbuy(close-nBE>m,1,lmt,BE);
bo:=1;sc:=1;
end
end
if tholding2=-1 then begin
if tsellholding(1)>1 then begin
if sc=0 then tsellshort(close-nBE>m,2,lmt,BE);
sc:=1;bo:=1;
end
if tsellholding(1)=1 then begin
if sc=0 then tsellshort(close-nBE>m,1,lmt,BE);
sc:=1;
if bo=0 then tbuy(close-nBE>m,1,lmt,BE);
bo:=1;
end
if tsellholding(1)=0 then begin
if bo=0 and sc=0 then tbuy(close-nBE>m,2,lmt,BE);
bo:=1;sc:=1;
end
end
if tholding2<-1 then begin
if tsellholding(1)>2 then begin
if sc=0 then tsellshort(close-nBE>m,3,lmt,BE);
sc:=1;bo:=1;
end
if tsellholding(1)>1 then begin
if sc=0 then tsellshort(close-nBE>m,2,lmt,BE);
sc:=1;
if bo=0 then tbuy(close-nBE>m,1,lmt,BE);
bo:=1;
end
if tsellholding(1)=1 then begin
if sc=0 then tsellshort(close-nBE>m,1,lmt,BE);
sc:=1;
if bo=0 then tbuy(close-nBE>m,1,lmt,BE);
bo:=1;
end
if tsellholding(1)=0 then begin
if bo=0 and sc=0 then tbuy(close-nBE>m,2,lmt,BE);
bo:=1;sc:=1;
end
end
end
if tholding2>=e then begin//极限再平空开多
if not(TORDERPRICE(4,1)=BE) then sc:=0;
if not(TORDERPRICE(1,1)=BE) then bo:=0;
if ERSI1>=-32 then bo:=1;
if sc=0 and ERSI1<-32 and tsellholding(1)>1 then begin
tsellshort(close-nBE>m,2,lmt,BE);
sc:=1;
end
if sc=0 and ERSI1<-32 and tsellholding(1)=1 then begin
tsellshort(close-nBE>m,1,lmt,BE);
sc:=1;
end
if bo=0 then begin
tbuy(close-nBE>m,1,lmt,BE);
bo:=1;
end
end
end
if tholding2<=-e and taccount(4)<0 and ERSI1<32 then begin
if not(TORDERPRICE(4,1)=BE) then sc:=0;
if not(TORDERPRICE(1,1)=BE) then bo:=0;
if sc=0 and tsellholding(1)>2 then begin
tsellshort(close-nBE>m,3,lmt,BE);
sc:=1;
bo:=1;
end
if sc=0 and tsellholding(1)>1 then begin
tsellshort(close-nBE>m,2,lmt,BE);
sc:=1;
end
if sc=0 and tsellholding(1)=1 then begin
tsellshort(close-nBE>m,1,lmt,BE);
sc:=1;
end
if bo=0 then begin
tbuy(close-nBE>m,1,lmt,BE);
tbuy(close-nBE>m,1,lmt,BE);
tbuy(close-nBE>m,1,lmt,BE);
bo:=1;
end
end
end
能解释这段程序为什么一两秒内会在同价位反复开平单吗