Functions
talib.mode()
Of the last `length` values of `source`, this reports the one that recurs most often. It is a statistical mode over a moving window, and it returns a series float like the other window functions here.
Syntax
talib.mode(series float source, series int length) → series float
Arguments
source required series float The series whose values are counted. length required series int How many bars the window covers. 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")