固定止损:
if holding>0 and c<enterprice-5 then sell(1,0,market);
if holding<0 and c>enterprice+5 then sellshort(1,0,market);
固定止盈:
if holding>0 and c>enterprice+5 then sell(1,0,market);
if holding<0 and c<enterprice-5 then sellshort(1,0,market);
开仓后固定周期:
if enterbars=5 then begin
sell(1,0,market);
sellshort(1,0,market);
end