OPEN-SOURCE SCRIPT
Cập nhật Periodic Volume Profile

This indicator visualizes volume profiles that are dynamically anchored to market structure events, rather than fixed time intervals. It builds these profiles using high-resolution intra-bar data to provide a precise view of where value is established during critical market phases.
Key Features:
Event-Based Profile Anchoring: The indicator starts a new profile based on one of three user-selected events ('Profile Anchor'):
Swing: A new profile begins when the 'impulse baseline' (derived from delta) changes. This baseline adjusts when a new price pivot is confirmed: When a price high forms, the baseline moves to the lower of its previous level or the peak delta (max of delta O/C) at the pivot. When a price low forms, it moves to the higher of its previous level or the trough delta (min of delta O/C).
Structure: A new profile begins immediately on the bar that confirms a market structure break (e.g., a new HH or LL, based on a sequence of price pivots).
Delta: A new profile begins immediately on the bar that confirms a break in the cumulative delta's market structure (e.g., a new HH or LL in the delta).
Statistical Profile Engine: For each bar in the anchored period, the indicator builds a volume profile on a lower 'Intra-Bar Timeframe'. It uses:
Statistical Models ('Allot model'): Distributes volume across price levels using 'PDF' (Probability Density Function) or 'Classic' (close) methods.
Buy/Sell Classifiers ('Volume Estimator'): Splits volume using a 'Dynamic' (trend/wick-based) or 'Classic' (candle color) model.
Note on Anchor Lag: The different anchor types have different delays. 'Structure' and 'Delta' profiles begin in real-time on the confirmation bar. The 'Swing' profile calculation is plotted retroactively to the pivot's origin, as the pivot is only confirmed Pivot Right Bars after it occurs.
Flexible Visualization Modes: The finalized profile (plotted at the end of each period) can be displayed in three ways: 'Up/Down' (buy vs. sell), 'Total' (combined volume), and 'Delta' (net difference).
Developing Real-Time Metrics: The indicator plots the developing Point of Control (POC), Value Area (VA), VWAP, and Standard Deviation bands in real-time as the new profile forms.
Dynamic Row Sizing: Includes an option ('Rows per Percent') to automatically adjust the number of profile rows (buckets) based on the profile's price range, maintaining a consistent visual density.
Integrated Alerts: Includes 13 alerts that trigger for:
A new profile reset ('Profile was resetted').
Price crossing any of the 6 developing levels (POC, VA High/Low, VWAP, StdDev High/Low).
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.
Key Features:
Event-Based Profile Anchoring: The indicator starts a new profile based on one of three user-selected events ('Profile Anchor'):
Swing: A new profile begins when the 'impulse baseline' (derived from delta) changes. This baseline adjusts when a new price pivot is confirmed: When a price high forms, the baseline moves to the lower of its previous level or the peak delta (max of delta O/C) at the pivot. When a price low forms, it moves to the higher of its previous level or the trough delta (min of delta O/C).
Structure: A new profile begins immediately on the bar that confirms a market structure break (e.g., a new HH or LL, based on a sequence of price pivots).
Delta: A new profile begins immediately on the bar that confirms a break in the cumulative delta's market structure (e.g., a new HH or LL in the delta).
Statistical Profile Engine: For each bar in the anchored period, the indicator builds a volume profile on a lower 'Intra-Bar Timeframe'. It uses:
Statistical Models ('Allot model'): Distributes volume across price levels using 'PDF' (Probability Density Function) or 'Classic' (close) methods.
Buy/Sell Classifiers ('Volume Estimator'): Splits volume using a 'Dynamic' (trend/wick-based) or 'Classic' (candle color) model.
Note on Anchor Lag: The different anchor types have different delays. 'Structure' and 'Delta' profiles begin in real-time on the confirmation bar. The 'Swing' profile calculation is plotted retroactively to the pivot's origin, as the pivot is only confirmed Pivot Right Bars after it occurs.
Flexible Visualization Modes: The finalized profile (plotted at the end of each period) can be displayed in three ways: 'Up/Down' (buy vs. sell), 'Total' (combined volume), and 'Delta' (net difference).
Developing Real-Time Metrics: The indicator plots the developing Point of Control (POC), Value Area (VA), VWAP, and Standard Deviation bands in real-time as the new profile forms.
Dynamic Row Sizing: Includes an option ('Rows per Percent') to automatically adjust the number of profile rows (buckets) based on the profile's price range, maintaining a consistent visual density.
Integrated Alerts: Includes 13 alerts that trigger for:
A new profile reset ('Profile was resetted').
Price crossing any of the 6 developing levels (POC, VA High/Low, VWAP, StdDev High/Low).
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.
Phát hành các Ghi chú
This indicator renders a high-resolution Periodic Volume Profile (PVP) by analyzing intra-bar data. The profile period is anchored to a user-defined timeframe (e.g., Session, Day, Week), allowing for cyclical analysis of where value is established.Key Features:
Statistical Volume Profile Engine: For each bar in the selected period, the indicator builds a complete volume profile on a lower 'Intra-Bar Timeframe'. Instead of simple tick counting, it uses statistical models ('PDF' allocation) to distribute volume across price levels and advanced classifiers ('Dynamic' split) to determine the buy/sell pressure within that profile.
Flexible Profile Display: The finalized profile (plotted at the end of each period) can be visualized in three distinct ways: 'Up/Down' (buy vs. sell), 'Total' (combined volume), and 'Delta' (net difference).
Developing Key Levels: The indicator also plots the developing Point of Control (POC), Value Area (VA), VWAP, and Standard Deviation bands in real-time as the period unfolds, providing live insights into the emerging market structure.
Dynamic Row Sizing: Includes an option ('Rows per Percent') to automatically adjust the number of profile rows (buckets) based on the profile's price range, maintaining a consistent visual density.
Integrated Alerts: Includes 12 alerts that trigger when the main price crosses over or under the key developing levels: POC, VWAP, Value Area High/Low, and the +/- Standard Deviation bands.
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.