if time<145000 then begin
if spk=1 then begin
tbuy(tbuyholding(1)=0,手数,MKT),SLITHERMETHOD;
extgbdataset('kaiduo',tenterprice);
tbuyshort(tsellholding(1)=0,手数,MKT),SLITHERMETHOD;
extgbdataset('kaikong',tenterprice);
end
end
et1:=extgbdata('kaiduo') ;//多头开仓价
et2:=extgbdata('kaikong') ;//空头开仓价
if DYNAINFO(7)>et2 and TSELLHOLDING(1)>0 then begin
if mod(DYNAINFO(7)-(et2+1),2)=0 then tsellshort(1,1,lmt,et2+1),SLITHERMETHOD;
if mod(DYNAINFO(7)-(et2+(2*n-1)),2)=0 then tsellshort(1,1,lmt,et2+(2*n-1)),SLITHERMETHOD;
n:=n+1;
end
if DYNAINFO(7)>et1 and TBUYHOLDING(1)>0 then begin
if mod(DYNAINFO(7)-(et1+2),2)=0 then tsell(1,1,lmt,et1+2),SLITHERMETHOD;
if mod(DYNAINFO(7)-(et1+2*n),2)=0 then tsell(1,1,lmt,et1+2*n),SLITHERMETHOD;
n:=n+1;
end
不平仓???
都做到后台程序化了,判断条件结果成立不成立还用目测
调试一下啊