Globalvariable:n=1;//bar控制一根K线只能有一次开平仓et1:=extgbdata('kaiduo') ;
et2:=extgbdata('kaikong') ;
if DYNAINFO(7)>et2 and TSELLHOLDING(1)>0 and barpos>extgbdata('bar') then begin
if mod(o-(et2+1),2)=0 then tsellshort(1,1,lmt,et2+n,0),SLITHERMETHOD;
n:=1;
if mod(o-(et2+3),2)>=0 then tsellshort(1,1,lmt,et2+2*n-1,0),SLITHERMETHOD;
n:=n+1;
end
这样编写对?
[此贴子已经被作者于2014/5/26 23:36:30编辑过]