price swings and s/r
study("10", overlay=true) leftBars = input(10) rightBars=input(10) offSet=input(-10) PH = input(true, title="PivotHigh") PL = input(true, title="PivotLow") //HTF = input(title="Timeframe", type=string, defval="1W") secPH = security(tickerid, period, pivothigh(leftBars, rightBars)) secPL = security(tickerid, period, pivotlow(leftBars, rightBars)) plot(PH and secPH ? secPH :na , title="PH",style=cross, color=teal, transp=0 , linewidth=2, trackprice=false, offset=offSet) plot(PL and secPL ? secPL :na , title="PL",style=cross, color=teal, transp=0 , linewidth=2, trackprice=false, offset=offSet)