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 Series of values to process. length required series int Length (number of bars back). Return Type
series float Example
//@lipi=2
indicator("Mode of Close Price", overlay=true)
length = input(20, "Lookback Period")
modePrice = talib.mode(close, length)
plot(modePrice, color=color.blue, title="Mode Price")