Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.ta.stochrsi
On this pageSignatureParametersReturnsExample

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

NameTypeRequiredDefaultDescription
sourceseriesYes—Series of values to process.
lengthintNo—Stoch RSI length (default 14).
rsiLengthintNo—RSI length (default 14).
kintNo—K smoothing (default 3).
dintNo—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.

AlertaScript

No results found.

Search by name, alias, or keyword.