ma3:=ma(c,3);
ma100:=ma(c,100);
if cross(ma3,ma100) then buy(holding=0,1,thisclose);
if l<valuewhen(enterbars=0,l) and holding>0 and enterbars>0 then sell(1,0,market);
if l<=hhv(h,enterbars+1)*0.7 then sell(1,0,market);
if cross(ma100,ma3) then buyshort(holding=0,1,thisclose);
if h>valuewhen(enterbars=0,h) and holding<0 and enterbars>0 then sellshort(1,0,market);
if h>=llv(l,enterbars+1)*1.3 then sellshort(1,0,market);