OPEN-SOURCE SCRIPT

True Strength Index (TSI)%

266
📌 Script Name: TSI Percentuale
This script is a custom True Strength Index (TSI) indicator that expresses momentum strength as a percentage from 0% to 100%, instead of the traditional TSI scale.

✅ What the Script Does
Calculates the standard TSI:

Uses double exponential smoothing of price changes and their absolute values.

Formula:

TSI_raw
=
100
×
DoubleSmoothed(ΔPrice)
DoubleSmoothed(|ΔPrice|)
TSI_raw=100×
DoubleSmoothed(|ΔPrice|)
DoubleSmoothed(ΔPrice)


Normalizes TSI to a percentile scale:

Over a user-defined lookback period, the script finds the lowest and highest TSI values.

It then rescales the current TSI to a value between 0% (minimum) and 100% (maximum).

50% represents neutral momentum (i.e., "flat").

Plots the result:

tsi_percent is plotted as a blue line.

Horizontal dashed/dotted lines are drawn at:

0% → strong downward momentum

50% → neutral

100% → strong upward momentum

⚙️ Inputs
Long Length: Long EMA smoothing period (default: 25)

Short Length: Short EMA smoothing period (default: 13)

Signal Length: (not used in this version, can be removed or extended)

Lookback Period: Number of bars to calculate min/max normalization (default: 100)

🧠 Why Use This Indicator
The classic TSI ranges around [-100, +100] and can be hard to interpret.

This version makes TSI visually intuitive by converting it to percentile form, allowing easier comparison of momentum strength across time and instruments.

It’s particularly useful for defining zones like:

Above 70% = strong bullish

Below 30% = strong bearish

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.