2x MA (high,low as source)
+ Linreg curve
Cheers
+ Linreg curve
Cheers
study("MAx2 + LR",overlay=true) LR_curve=input(200) show_LR_curve=input(true) LR_offset=input(0) ema= input(defval=false,title='use ema instead of sma?') ma = ema? ema(high,200) : sma(high,200) ma1=plot(ema(high,200),color=white, linewidth=2) ma2=plot(ema(low,200),color=white, linewidth=2) z=linreg(close,LR_curve,LR_offset) col=z>z[1]? lime : red plot(z and show_LR_curve? z : na,color=col)