Guys are there any of you that can convert this Tradingview indicator option into TOS script (or make an indictor like it)? It's basically a three candle formation for high and low pivot points which form a line at that pivot point. I have made a pattern in TOS but that only gives me a point indicator on the last 3rd candle of the formation which is no where close to this. I have copied the pivot source out of the TV script code and posted it below if that helps, and if needed I can post the full indicator code if needed. Any help with this would greatly be appreciated.
I only want the pivot point lines which is part of this Tradingview code:
Super OrderBlock / FVG / BoS Tools by makuchaku & eFe
https://www.tradingview.com/script/aZACDmTC-Super-OrderBlock-FVG-BoS-Tools-by-makuchaku-eFe/
plotPVT = input.bool(defval=true, title='Plot Pivots', group='Pivots')
pivotLookup = input.int(defval=1, minval=1, maxval=5,title='Pivot Lookup', group='Pivots', tooltip='Minimum = 1, Maximum = 5')
pvtTopColor = input.color(defval=color.new(color.silver, 0), title='Pivot Top Color', group='Pivots', inline='PVT Color')
pvtBottomColor = input.color(defval=color.new(color.silver, 0), title='Pivot Bottom Color', group='Pivots', inline='PVT Color')
//////////////////// Pivots ////////////////////
hih = ta.pivothigh(high, pivotLookup, pivotLookup)
lol = ta.pivotlow(low , pivotLookup, pivotLookup)
top = ta.valuewhen(hih, high[pivotLookup], 0)
bottom = ta.valuewhen(lol, low [pivotLookup], 0)
plot(top, offset=-pivotLookup, linewidth=1, color=(top != top[1] ? na : (plotPVT ? pvtTopColor : na)), title="Pivot Top")
plot(bottom, offset=-pivotLookup, linewidth=1, color=(bottom != bottom[1] ? na : (plotPVT ? pvtBottomColor : na)), title="Pivot Bottom")