OPEN-SOURCE SCRIPT
Volume Weighted Standard Deviation

This indicator calculates the Standard Deviation and decomposes total volatility into its core components, allowing to analyze the underlying character of the market.
Key Features:
Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates a simple (Volume-Weighted) Standard Deviation of the selected Source.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility (choppiness, noise) and between-bar volatility (trending moves). (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Dual Display Modes: The indicator offers two modes to visualize this information:
Absolute Mode: Plots the total standard deviation as a stacked area chart, showing the proportional contribution of the 'Between' and 'Within' components.
Normalized Mode: Plots the direct ratio of each component's variance (from 0 to 1), making it easy to identify which character is dominant.
Calculation Options: The volatility calculation can be optionally Volume weighted. An optional Normalize Volatility setting performs the calculation in logarithmic space, making volatility comparable across different price scales.
Volatility Pivot Detection: Includes a built-in pivot detector that identifies significant turning points (highs and lows) in the total volatility line. (Note: This is only visible in 'Absolute Mode').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Volatility Lines: The volatility lines can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 6 alerts for:
Volatility character changes (e.g., 'Trend Character Emerging', 'Character Change from Trend to Choppy').
Volatility pivot (high or low) detection.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Key Features:
Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates a simple (Volume-Weighted) Standard Deviation of the selected Source.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility (choppiness, noise) and between-bar volatility (trending moves). (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Dual Display Modes: The indicator offers two modes to visualize this information:
Absolute Mode: Plots the total standard deviation as a stacked area chart, showing the proportional contribution of the 'Between' and 'Within' components.
Normalized Mode: Plots the direct ratio of each component's variance (from 0 to 1), making it easy to identify which character is dominant.
Calculation Options: The volatility calculation can be optionally Volume weighted. An optional Normalize Volatility setting performs the calculation in logarithmic space, making volatility comparable across different price scales.
Volatility Pivot Detection: Includes a built-in pivot detector that identifies significant turning points (highs and lows) in the total volatility line. (Note: This is only visible in 'Absolute Mode').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Volatility Lines: The volatility lines can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 6 alerts for:
Volatility character changes (e.g., 'Trend Character Emerging', 'Character Change from Trend to Choppy').
Volatility pivot (high or low) detection.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.