OPEN-SOURCE SCRIPT
Zaktualizowano

Volume Weighted Intra Bar LR Standard Deviation

627
This indicator analyzes market character by providing a detailed view of volatility. It applies a Linear Regression model to intra-bar price action, dissecting the total volatility of each bar into three distinct components.

Key Features:

Three-Component Volatility Decomposition: By analyzing a lower timeframe ('Intra-Bar Timeframe'), the indicator separates each bar's volatility into:

Trend Volatility (Green/Red): Volatility explained by the intra-bar linear regression slope (Momentum).

Residual Volatility (Yellow): Volatility from price oscillating around the intra-bar trendline (Mean-Reversion).

Within-Bar Volatility (Blue): Volatility derived from the range of each intra-bar candle (Noise/Choppiness).

Layered Column Visualization: The indicator plots these components as a layered column chart. The size of each colored layer visually represents the dominance of each volatility character.

Dual Display Modes: The indicator offers two modes to visualize this decomposition:

Absolute Mode: Displays the total standard deviation as the column height, showing the absolute magnitude of volatility and the contribution of each component.

Normalized Mode: Displays the components as a 100% stacked column chart (scaled from 0 to 1), focusing purely on the percentage ratio of Trend, Residual, and Noise.

Calculation Options:

Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).

Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space).

Volume Weighting: An option (Volume weighted) applies volume weighting to all intra-bar calculations.

Multi-Component Pivot Detection: Includes a pivot detector that identifies significant turning points (highs and lows) in both the Total Volatility and the Trend Volatility Ratio. (Note: These pivots are only plotted when 'Plot Mode' is set to 'Absolute').

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 Analysis: The entire intra-bar analysis can be run on a higher timeframe (using the Timeframe input), 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 9 comprehensive alerts for:

Volatility character changes (e.g., 'Character Change from Noise to Trend').

Dominant character emerging (e.g., 'Bullish Trend Character Emerging').

Total Volatility pivot (High/Low) detection.

Trend Volatility pivot (High/Low) detection.

Caution! Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.

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.
Informacje o Wersji
2026-02-01 0.2.0
(Mod) Updated libraries LibTmFr, LibWght, LibBrSt, and LibPvot to their latest versions.
(Mod) Refactored volatility logic: now calculates variances first for better MTF accuracy.
(Add) Added 'Pivot Algorithm' input to select between Fractal, LinReg, and Topologic models.
(Mod) Renamed Display Modes (Normalized -> Relative) and fixed typos in Alert Titles.
(Add) Added runtime error check for non-positive prices when using 'Normalize' (Log-Mode).
(Ref) Refactored stable array initialization in the multi-timeframe conversion logic.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.