if high>h0 then h0:=high; if low<ltoday then ltoday:=low;
if time>=opentime(1) and time<closetime(0)-500 and sn>=2 and rf thenbegin if h0>=up and holding>=0 then begin if low<=senter+(h0-up)/div then begin sell(1,v1,thisclose); buyshort(1,v1,thisclose); end end
if ltoday<=bsetup and holding<=0 then begin if high>=benter-(bsetup-ltoday)/div then begin if high>=benter-(bsetup-ltoday)/div then begin sellshort(1,v1,thisclose); buy(1,v1,thisclose); end end end
if holding<0 then begin if high-enterprice>=i then sellshort(1,v1,thisclose); end
if holding>0 then begin if enterprice-low>=i then sell(1,v1,thisclose); end
if holding=0 then begin if high>=bbreak then buy(1,v1); end
if holding=0 then begin if low<=sbreak then buyshort(1,v1); end end
if time>=closetime(0)-500 then begin if holding<0 then sellshort(1,v1);
if holding>0 then sell(1,v1); end 资产:asset,noaxis,coloryellow,linethick2;