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

Momentum / Reference

alerta.ta.tsi

TradingView-compatible spelling: ta.tsi, runs without warnings

Calculates the True Strength Index. Pine form `ta.tsi(source, short_length, long_length)`: EMA(EMA(change, long), short) / EMA(EMA(|change|, long), short), a ratio in [-1, 1]. The legacy bare form `tsi(source, longLength, shortLength)` (also `alerta.tsi`) takes the long length first and returns the same index times 100.

alerta.ta.tsi(source, short_length, long_length) or tsi(source, longLength, shortLength) → series float

Parameters

NameTypeRequiredDefaultDescription
sourceseriesYes—Series of values to process.
longLengthintNo—ta.tsi: short_length, the second smoothing (default 13). Legacy tsi(): the long smoothing length (default 25).
shortLengthintNo—ta.tsi: long_length, the first smoothing (default 25). Legacy tsi(): the short smoothing length (default 13).

Returns

series float

Example

alerta.ta.tsi
plot(ta.tsi(close, 13, 25), { pane: "oscillator" })plot(tsi(close, 25, 13), { 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.