Functions
talib.mode()
Returns the mode of the series. If there are several values with the same frequency, it returns the smallest value.
Syntax
talib.mode(series float source, series int length) → series float
Arguments
source required series float Series of values to process. length required series int Length (number of bars back). Return Type
series float Example
indicator("Mode of Close Price", overlay=true)
length = input(20, "Lookback Period")
modePrice = ta.mode(close, length)
plot(modePrice, color=color.blue, title="Mode Price")