ta.rsi
Gauge overbought and oversold conditions on a 0 to 100 scale from recent gains and losses.
ta.rsi(source, length)Relative Strength Index over Wilder's smoothing of gains and losses. Seeded with the simple average of the first length changes, which is the canonical Wilder seed.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to read. |
length | Constant | number | 14 | 1 to 10000 | Window in observed bars. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
length + 1bars. Names in the warm-up are this operator’s parameters.- Missing values
- na until length+1 observations have been seen (the first change needs two bars, then the smoothing needs a full window). A flat window with no losses returns 100.
Example
ta.rsi(close, 14)rsi = ta.rsi(close, 14)
plot(rsi, "Strength 14")
hline(70, "Overbought")