talib.highestbars
Locates the highest value of source within the last length bars and returns its position rather than its value.
It returns a series int, which makes it the companion to talib.highest.
talib.highestbars(series float source, series int length) → series int| Parameter | Type | Required | Description |
|---|---|---|---|
source | series float | yes | The series to search. |
length | series int | yes | How many bars the search covers. |
Returns series int — A series int giving the offset of the highest bar.
indicator("Offset of the highest high")
plot(talib.highestbars(high, 20))See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.