OPEN-SOURCE SCRIPT
Volatility Regime (Latest) New!

This indicator is designed to separate two different market concepts: volatility regime and price displacement.
The main visualization focuses on Volatility Regime, calculated from the standard deviation of log returns over a selected lookback period. The result is ranked against its own historical distribution using a rolling percentile filter, allowing the market to be classified into Low, Mid, or High Volatility regimes without assuming a normal distribution.
A secondary reference metric, Price Displacement, is also included. It measures how far the current price is from its rolling mean using a price z-score. This helps identify whether price is extended from its local average, while keeping it separate from the main volatility regime logic.
Core concept:
* Volatility Regime measures how unstable returns are.
* Price Displacement measures how far price is from its mean.
* Rolling percentile ranking is used to classify regimes empirically.
* The model does not assume that market returns follow a normal distribution.
This tool is intended for regime awareness, risk context, volatility filtering, and market condition analysis. It should not be used as a standalone buy or sell signal.
P-Value
The main visualization focuses on Volatility Regime, calculated from the standard deviation of log returns over a selected lookback period. The result is ranked against its own historical distribution using a rolling percentile filter, allowing the market to be classified into Low, Mid, or High Volatility regimes without assuming a normal distribution.
A secondary reference metric, Price Displacement, is also included. It measures how far the current price is from its rolling mean using a price z-score. This helps identify whether price is extended from its local average, while keeping it separate from the main volatility regime logic.
Core concept:
* Volatility Regime measures how unstable returns are.
* Price Displacement measures how far price is from its mean.
* Rolling percentile ranking is used to classify regimes empirically.
* The model does not assume that market returns follow a normal distribution.
This tool is intended for regime awareness, risk context, volatility filtering, and market condition analysis. It should not be used as a standalone buy or sell signal.
P-Value
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.