Momentum / Reference
alerta.ta.stochrsi
TradingView-compatible spelling: ta.stochrsi, runs without warnings
Calculates the Stochastic RSI oscillator.
alerta.ta.stochrsi(source, length, rsiLength, k, d) → [k, d]Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series | Yes | — | Series of values to process. |
length | int | No | — | Stoch RSI length (default 14). |
rsiLength | int | No | — | RSI length (default 14). |
k | int | No | — | K smoothing (default 3). |
d | int | No | — | D smoothing (default 3). |
Returns
[k, d]Example
alerta.ta.stochrsi
[k, d] = stochrsi(close, 14, 14, 3, 3)plot(k, { title: "StochRSI K", color: color.blue, pane: "oscillator" })plot(d, { title: "StochRSI D", color: color.orange, pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.