ta.pivothigh
Pivot high price, reported rightbars bars after the pivot (when it is confirmed), otherwise na. The pivot bar must be strictly higher than the leftbars bars before it and not lower than the rightbars bars after it. With two arguments the source is high.
ta.pivothigh(source: float, leftbars: simple int, rightbars: simple int) -> series float
ta.pivothigh(leftbars: simple int, rightbars: simple int) -> series float
Parameters
sourcefloat: The values to look for a pivot in. Leave it out (ta.pivothigh(leftbars, rightbars)) to use high.leftbarssimple int: Bars before the pivot that must all be strictly lower; a literal or an input, 0 or more.rightbarssimple int: Bars after the pivot that must not be higher; the pivot is reported this many bars late. A literal or an input, 0 or more.
Example
ph = ta.pivothigh(high, 5, 5)