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 floatParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series | Yes | — | Series of values to process. |
longLength | int | No | — | ta.tsi: short_length, the second smoothing (default 13). Legacy tsi(): the long smoothing length (default 25). |
shortLength | int | No | — | ta.tsi: long_length, the first smoothing (default 25). Legacy tsi(): the short smoothing length (default 13). |
Returns
series floatExample
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.