OPEN-SOURCE SCRIPT
Trend Volatility Index (TVI)

Trend Volatility Index (TVI)
A robust nonparametric oscillator for structural trend volatility detection
⸻
What is this?
TVI is a volatility oscillator designed to measure the strength and emergence of price trends using nonparametric statistics.
It calculates a U-statistic based on the Gini mean difference across multiple simple moving averages.
This allows for objective, robust, and unbiased quantification of trend volatility in tick-scale values.
⸻
What can it do?
• Quantify trend strength as a continuous value aligned with tick price scale
• Detect trend breakouts and volatility expansions
• Identify range-bound market states
• Detect early signs of new trends with minimal lag
⸻
What can’t it do?
• Predict future price levels
• Predict trend direction before confirmation
⸻
How it works
TVI computes a nonparametric dispersion metric (Gini mean difference) from multiple SMAs of different lengths.
As this metric shares the same dimension as price ticks, it can be directly interpreted on the chart as a volatility gauge.
The output is plotted using candlestick-style charts to enhance visibility of change rate and trend behavior.
⸻
Disclaimer
TVI does not predict price. It is a structural indicator designed to support discretionary judgment.
Trading carries inherent risk, and this tool does not guarantee profitability. Use at your own discretion.
⸻
Innovation
This indicator introduces a novel approach to trend volatility by applying U-statistics over time series
to produce a nonparametric, unbiased, and robust estimate of structural volatility.
日本語要約
Trend Volatility Index (TVI) は、ノンパラメトリックなU統計量(Gini平均差)を使ってトレンドの強度を客観的に測定することを目的に開発されたボラティリティ・オシレーターです。
ティック単位で連続的に変化し、トレンドのブレイク・レンジ・初動の予兆を定量的に検出します。
未来の価格や方向は予測せず、現在の構造的ばらつきだけをロバストに評価します。
A robust nonparametric oscillator for structural trend volatility detection
⸻
What is this?
TVI is a volatility oscillator designed to measure the strength and emergence of price trends using nonparametric statistics.
It calculates a U-statistic based on the Gini mean difference across multiple simple moving averages.
This allows for objective, robust, and unbiased quantification of trend volatility in tick-scale values.
⸻
What can it do?
• Quantify trend strength as a continuous value aligned with tick price scale
• Detect trend breakouts and volatility expansions
• Identify range-bound market states
• Detect early signs of new trends with minimal lag
⸻
What can’t it do?
• Predict future price levels
• Predict trend direction before confirmation
⸻
How it works
TVI computes a nonparametric dispersion metric (Gini mean difference) from multiple SMAs of different lengths.
As this metric shares the same dimension as price ticks, it can be directly interpreted on the chart as a volatility gauge.
The output is plotted using candlestick-style charts to enhance visibility of change rate and trend behavior.
⸻
Disclaimer
TVI does not predict price. It is a structural indicator designed to support discretionary judgment.
Trading carries inherent risk, and this tool does not guarantee profitability. Use at your own discretion.
⸻
Innovation
This indicator introduces a novel approach to trend volatility by applying U-statistics over time series
to produce a nonparametric, unbiased, and robust estimate of structural volatility.
日本語要約
Trend Volatility Index (TVI) は、ノンパラメトリックなU統計量(Gini平均差)を使ってトレンドの強度を客観的に測定することを目的に開発されたボラティリティ・オシレーターです。
ティック単位で連続的に変化し、トレンドのブレイク・レンジ・初動の予兆を定量的に検出します。
未来の価格や方向は予測せず、現在の構造的ばらつきだけをロバストに評価します。
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.