OPEN-SOURCE SCRIPT

Trend Strength Index - ZTF

236
This is a modification of TradingView's default Trend Strength Index indicator.

The Trend Strength Index measures the tendency of a symbol to either trend steadily or to revert to its mean. The core idea behind TSI is that the more momentum a symbol has relative to its volatility, the more likely it is to follow a trend and less likely to revert to its mean.

This indicator analyzes price momentum using the Pearson correlation coefficient, a normalized measure of the linear relationship between time series. Its output shows the correlation between the chart's closing prices and bar index values over a defined number of bars.

A value near +1 shows that prices experienced relatively steady increases across successive bars, indicating high upward trend strength
A value near -1 shows that prices experienced relatively steady decreases across successive bars, indicating high downward trend strength
A value near 0 suggests a lack of trend strength, because prices did not demonstrate a steady positive or negative relationship with the bar index

ZTF Modification: Added a green background highlight that appears when TSI reaches 0.90 or above, providing a visual alert for extremely strong bullish trend conditions.

Credit: Based on TradingView's default Trend Strength Index indicator.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.