Momentum OscillatorsPine Script v6

ta.tsi()True Strength Index

The True Strength Index uses double smoothing of price changes to measure trend direction and identify overbought/oversold conditions.

Syntax

Syntax
ta.tsi(source, short_length, long_length) → series float

Arguments

ParameterTypeDescription
sourceseries int/floatPrice or value series (commonly close).
short_lengthsimple intFirst smoothing length for price change.
long_lengthsimple intSecond smoothing length applied after the first.

Returns

True Strength Index.

Remarks

None.

Code Examples

Pine Script v6 Example
//@version=6
indicator("ta.tsi")
plot(ta.tsi(close, 13, 25))

Trading Applications

Measure trend strength with double-smoothed momentum

Identify overbought/oversold conditions

Generate signals from signal line crossovers

Detect momentum divergences for reversal trading

Related Functions

Frequently Asked Questions

ta.tsi() returns the True Strength Index: double-smoothed momentum of price changes, designed to reduce noise and highlight sustained trend pressure.

TSI applies smoothing twice to the price change (conceptually EMA-style steps with short and long lengths) and normalizes, producing a centered oscillator-style output.

13/25 is a common starting point, but optimal settings vary. Test on your market and timeframe; shorter pairs react faster, longer pairs are smoother.

Generate ta.tsi() Code with AI

Skip the manual coding. Use Pineify's AI Coding Agent to generate Pine Script code using ta.tsi() and other built-in functions instantly.