LRC® auto
study("LRC® auto",overlay=true) h = isdaily or isweekly or ismonthly ? 250 : 360 z = h==2 and interval <= 240 ? 360 : h Len=h LR_offset=input(0) z1=linreg(high,Len,LR_offset) z2=linreg(low,Len,LR_offset) z2s=-stdev(z2,Len)+z2 z1s=stdev(z1,Len)+z1 //n1=plot(z1s,color=gray,transp=100,style=areabr) //n2=plot(z2s,color=gray,transp=100,style=areabr) //fill(n1,n2,color=gray,transp=80) m1=plot(linreg(high,Len,LR_offset),color=black,linewidth=2) m2=plot(linreg(low,Len,LR_offset),color=black,linewidth=2) m1q=plot(linreg(high,Len/2,LR_offset),color=black,linewidth=1) m2q=plot(linreg(low,Len/2,LR_offset),color=black,linewidth=1)