ta.pivothigh() - Pine Script Function
ta.pivothigh()
Section titled “ta.pivothigh()”Overview
Section titled “Overview”This function returns price of the pivot high point. It returns ‘NaN’, if there was no pivot high point.
Syntax
Section titled “Syntax”ta.pivothigh(leftbars, rightbars) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| leftbars | series int/float | Left strength. |
Returns
Section titled “Returns”Price of the point or ‘NaN’.
Remarks
Section titled “Remarks”- If parameters ‘leftbars’ or ‘rightbars’ are series you should use max_bars_back function for the ‘source’ variable.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("PivotHigh", overlay=true)leftBars = input(2)rightBars=input(2)ph = ta.pivothigh(leftBars, rightBars)plot(ph, style=plot.style_cross, linewidth=3, color= color.red, offset=-rightBars)