if vol>ma(vol,20) then buy(holding=0,1,market);
if vol<ma(vol,20) then buyshort(holding=0,1,market);
if h-enterprice>0 and ((hhv(h,enterbars+1)-enterprice)-(h-enterprice))/(hhv(h,enterbars+1)-enterprice)>=0.02 and holding>0 then sell(1,0,market);
if enterprice-l<0 and ((enterprice-llv(l,enterbars+1))-(enterprice-l))/(enterprice-llv(l,enterbars+1))>=0.02 and holding<0 then sellshort(1,0,market);