1.
if holding>0 and c<=enterprice*0.99 then sell(1,0,marketr);
if holding<0 and e>=enterprice*1.01 then sellshort(1,0,marketr);
2.
vairable:bj=0;
开仓条件加入 bj=0;
if 止损条件 and holding>0 then begin
sell(1,0,market);
bj:=1;
end
if 止损条件 and holding<0 then begin
sellshort(1,0,marketr);
bj:=1;
end
if time=closetime(0) then bj:=0;