Functions
talib.rsi()
Relative Strength Index for `source` over `length` bars. Two arguments and one series float back — the same shape as `talib.cmo` and `talib.cci`.
Syntax
talib.rsi(series float source, series int length) → series float
Arguments
source required series float The series the index is calculated on. length required series int How many bars the calculation covers. Return Type
series float Example
indicator("Relative Strength Index (RSI)", overlay=false)
length = input(14, "RSI Length")
rsiValue = talib.rsi(close, length)
plot(rsiValue, color=color.blue, title="RSI")
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)