Functions
talib.pivothigh()
Finds a pivot high — a bar that stands above `leftBars` bars on one side and `rightBars` bars on the other. `source` is optional; the two bar counts are not.
Syntax
talib.pivothigh(series float source, series int leftBars, series int rightBars) → series float
Arguments
source series float Optional. The series to search for pivots. leftBars required series int How many bars are required on the left of the candidate. rightBars required series int How many bars are required on the right of the candidate. Return Type
series float Example
indicator("Pivot Highs", overlay=true)
leftBars = input(5, "Left Bars")
rightBars = input(5, "Right Bars")
pivotHigh = talib.pivothigh(high, leftBars, rightBars)
plot(pivotHigh, style=plotStyle.scatter, color=color.red, title="Pivot Highs", offset=-rightBars)