rsv:=(close-llv(low,n))/(hhv(high,n)-llv(low,n)); k:=sma(rsv,m1,1); d:=sma(k,m2,1); j:=3*k-2*d; enterlong:cross(k,d) and k<s1 and d<s1,linethick0, tfilter; exitlong:cross(d,k) and k>s2 and d>s2,linethick0, tfilter; entershort:cross(d,k) and k>s2 and d>s2,linethick0, tfilter; exitshort:cross(k,d) and k<s1 and d<s1,linethick0, tfilter;