OPEN-SOURCE SCRIPT
[TL5 Volume Profile] Market Structure Volume Distribution

[TL5 Volume Profile] Market Structure Volume Distribution (LuxAlgo – Modified)
Overview
This indicator is a modified version of the original
“Market Structure Volume Distribution” by LuxAlgo.
Attribution & Disclaimer
This script is not an official LuxAlgo release.
All original concepts, logic, and methodology are credited to LuxAlgo.
This modified version is shared for educational and experimental purposes only.
The script analyzes market structure breaks and distributes volume across price levels only when a confirmed break of structure (BOS) occurs, producing a structure-driven volume profile.
Important
The core calculation logic is unchanged
Only the visual communication of volume has been modified
Core Logic (Unmodified – Original LuxAlgo)
The following components are identical to the original LuxAlgo implementation:
Pivot high / pivot low detection
Break of structure (BOS) confirmation
Directional bias classification:
Bullish → Buy volume
Bearish → Sell volume
Volume attribution using breakout candle volume
Price-row aggregation
Execution window logic
Non-repainting behavior after pivot confirmation
How volume is calculated → unchanged
Modifications in This Version
1️⃣ Visual Communication Changes (Primary Modification)
The representation of volume has been modified while preserving the underlying data:
Alternative volume profile box layout
Fixed-width stacked profile rows
Buy vs sell dominance-based coloring
Increased text size for improved readability
Dashed execution range grid lines
How volume is displayed → modified
What volume represents → unchanged
2️⃣ Execution-Level Enhancements (Added)
Additional visual and alert-based features were added for workflow convenience:
Execution high and low tracking
Extended horizontal lines at execution boundaries
Alerts on execution high / low detection
Alerts on bullish and bearish structure breaks
These features do not affect volume calculations.
3️⃣ Parameter Default Adjustments
Increased default profile row count
Adjusted default profile width
These changes impact visual resolution only, not logic.
Input Parameters
Data Gathering
Execute on all visible range
Uses all visible bars on the chart.
Execute on the last N bars
Limits calculations to the most recent bars.
Pivot Length
Controls sensitivity of structure detection.
Profile
Profile Rows – Number of price levels
Profile Width – Maximum visual width
Profile Mode
Total Volume
Buy & Sell Volume
Style
Buy volume color
Sell volume color
Optional dotted grid levels
Limitations & Safeguards
Requires at least one confirmed BOS inside the execution window
Execution windows above 5000 bars are restricted
Uses confirmed pivots → non-repainting after confirmation
Script will prompt parameter adjustment if no BOS is detected
Attribution & Disclaimer
This script is not an official LuxAlgo release.
All original concepts, logic, and methodology are credited to LuxAlgo.
This modified version is shared for educational and experimental purposes only.
For the original and supported version, please refer to LuxAlgo’s official indicators on TradingView.
Intended Audience
Market structure traders
Volume profile users
Institutional-style price action analysis
Intraday and swing traders on liquid markets
Overview
This indicator is a modified version of the original
“Market Structure Volume Distribution” by LuxAlgo.
Attribution & Disclaimer
This script is not an official LuxAlgo release.
All original concepts, logic, and methodology are credited to LuxAlgo.
This modified version is shared for educational and experimental purposes only.
The script analyzes market structure breaks and distributes volume across price levels only when a confirmed break of structure (BOS) occurs, producing a structure-driven volume profile.
Important
The core calculation logic is unchanged
Only the visual communication of volume has been modified
Core Logic (Unmodified – Original LuxAlgo)
The following components are identical to the original LuxAlgo implementation:
Pivot high / pivot low detection
Break of structure (BOS) confirmation
Directional bias classification:
Bullish → Buy volume
Bearish → Sell volume
Volume attribution using breakout candle volume
Price-row aggregation
Execution window logic
Non-repainting behavior after pivot confirmation
How volume is calculated → unchanged
Modifications in This Version
1️⃣ Visual Communication Changes (Primary Modification)
The representation of volume has been modified while preserving the underlying data:
Alternative volume profile box layout
Fixed-width stacked profile rows
Buy vs sell dominance-based coloring
Increased text size for improved readability
Dashed execution range grid lines
How volume is displayed → modified
What volume represents → unchanged
2️⃣ Execution-Level Enhancements (Added)
Additional visual and alert-based features were added for workflow convenience:
Execution high and low tracking
Extended horizontal lines at execution boundaries
Alerts on execution high / low detection
Alerts on bullish and bearish structure breaks
These features do not affect volume calculations.
3️⃣ Parameter Default Adjustments
Increased default profile row count
Adjusted default profile width
These changes impact visual resolution only, not logic.
Input Parameters
Data Gathering
Execute on all visible range
Uses all visible bars on the chart.
Execute on the last N bars
Limits calculations to the most recent bars.
Pivot Length
Controls sensitivity of structure detection.
Profile
Profile Rows – Number of price levels
Profile Width – Maximum visual width
Profile Mode
Total Volume
Buy & Sell Volume
Style
Buy volume color
Sell volume color
Optional dotted grid levels
Limitations & Safeguards
Requires at least one confirmed BOS inside the execution window
Execution windows above 5000 bars are restricted
Uses confirmed pivots → non-repainting after confirmation
Script will prompt parameter adjustment if no BOS is detected
Attribution & Disclaimer
This script is not an official LuxAlgo release.
All original concepts, logic, and methodology are credited to LuxAlgo.
This modified version is shared for educational and experimental purposes only.
For the original and supported version, please refer to LuxAlgo’s official indicators on TradingView.
Intended Audience
Market structure traders
Volume profile users
Institutional-style price action analysis
Intraday and swing traders on liquid markets
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.