The True Strength Index (TSI), developed by William Blau, is a momentum oscillator designed to provide a smoother and more reliable measure of market momentum. It fluctuates around a zero line, providing clear signals for trend direction, momentum, and overbought/oversold conditions.
**Classic Definition:** The original TSI is defined as a double-smoothed momentum indicator using two **Exponential Moving Averages (EMAs)**.
**Pro Features:** Our `TSI_Pro` implementation extends this concept by allowing the calculation to be based on either **standard** or **Heikin Ashi** price data, and offers unprecedented customization by allowing traders to replace the standard EMAs with other smoothing methods (like SMA, DEMA, or TEMA).
Unlike basic implementations that recalculate the entire history on every tick, this indicator employs an intelligent incremental algorithm.
* **State Tracking:** It utilizes `prev_calculated` to process only new bars.
* **Persistent Buffers:** Internal buffers persist their state between ticks.
* **Robust Offset Handling:** The engine correctly handles the initialization periods of the chained calculations, ensuring that each step starts only when valid data is available.
* The Heikin Ashi version (`CTSICalculator_HA`) is achieved simply by instructing the main calculator to instantiate the Heikin Ashi version of the data preparation module.
* **Zero Line Crossovers:** A crossover of the TSI line above the zero line indicates that long-term momentum has turned positive. A crossover below indicates negative momentum.
* **Signal Line Crossovers:** These provide earlier, shorter-term momentum signals. A bullish crossover is when the TSI line crosses above its signal line; a bearish crossover is the opposite.
* **Overbought/Oversold Levels:** The **+25 and -25** levels are often used to identify extreme momentum.
* **Divergence:** Due to its smoothness, the TSI is excellent for spotting divergences between price and momentum, which can foreshadow reversals.