ta.highestbars

Offset (0 or negative) to the highest value of the last length bars; the newest bar wins ties. With one argument the source is high.

ta.highestbars(source: float, length: simple int) -> series int
ta.highestbars(length: simple int) -> series int

Parameters

Example

ago = ta.highestbars(high, 20) // -3 means 3 bars ago