oo:=valuewhen(todaybar=1,open);
if h>oo+1 then buy(holding=0,1,market);
if l<oo-1 then buyshort(holding=0,1,market);
if holding>0 and h>enterprice+0.8 then sell(1,0,market);
if holding<0 and l<enterprice-0.8 then sellshort(1,0,market);
if holding>0 and l<enterprice-1 then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if holding<0 and h>enterprice+1 then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end