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
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。