OPEN-SOURCE SCRIPT
Dual Profile Structure Map [JOAT]

Dual Profile Structure Map [JOAT]
Introduction
Dual Profile Structure Map is an open-source session volume profile indicator that computes Point of Control, Value Area High, Value Area Low, and Initial Balance levels for the current session and displays them as a horizontal histogram overlaid on price. Unlike fixed-range or visible-range profiles, this indicator uses time-based session segmentation — the profile represents only the bars within the current trading day, updating continuously as each bar closes.
The profile answers a specific question: where was the majority of trading activity concentrated in the current session, and what are the structural reference levels that follow from that activity? The Initial Balance (the range of the first hour of the session) provides context for whether subsequent price behavior is an extension or a rejection.
Core Concepts
1. Volume Profile Calculation
Price range is divided into configurable bins. Each bar's volume is allocated to the bins that overlap its high-low range, proportionally by the fraction of the bar that falls within each bin. The result is an array of volume-at-price values for the session:
Pine Script®
2. Point of Control and Value Area
The Point of Control (POC) is the bin with the highest volume — the price level where the most trading occurred. The Value Area is computed using the standard 70% rule: starting from the POC, adjacent bins are added to the value area (choosing the higher-volume adjacent bin each time) until 70% of session volume is captured. The resulting Value Area High (VAH) and Value Area Low (VAL) define the range where value was accepted.

3. Initial Balance
The Initial Balance uses the high and low of the first configurable number of bars after session open (default: first 4 bars on a 15-minute chart = first hour). IB High and IB Low are drawn as horizontal lines across the chart. Price trading above IB High is bullish extension; below IB Low is bearish extension; inside the IB is balance.
4. Histogram Rendering
Volume bins are rendered as horizontal bars extending leftward from the right edge of the session. Bar width is proportional to relative volume. The POC bin uses a distinct color. Value area bins use a softer fill. Bins outside the value area use the dimmest fill. This creates the standard volume profile "bell curve" visualization.
Features
Input Parameters
Profile Configuration:
Display:
How to Use This Indicator
Step 1: Identify the POC
The POC is the fair value anchor for the session. Price gravitating toward the POC during a pullback indicates healthy trend behavior. Price unable to hold above or below the POC suggests indecision at current levels.
Step 2: Use Value Area for Range Context
Value area acceptance means price is spending time within the 70% volume zone — a range-bound state. Value area rejection (price rapidly leaving VAH or VAL and not returning) indicates directional conviction.
Step 3: Trade Initial Balance Extensions
A close above IB High with follow-through is a bullish extension signal. A close below IB Low is bearish. Range expansion beyond the IB indicates participants accepting new value outside the opening equilibrium.
Step 4: Watch POC as Support or Resistance
On future pullbacks, the prior session's POC often acts as structural support or resistance. The indicator's persistent level lines provide these reference points across sessions.
Indicator Limitations
Originality Statement
The combination of a real-time session volume profile with Initial Balance tracking, candle coloring by value area position, and a live-updating dashboard in a single Pine Script v6 publication provides a self-contained session structure tool. The session-adaptive profile calculation using proportional volume allocation across bins is implemented from first principles, not adapted from another published script.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Volume profile levels are historical references and do not guarantee future price reactions. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Introduction
Dual Profile Structure Map is an open-source session volume profile indicator that computes Point of Control, Value Area High, Value Area Low, and Initial Balance levels for the current session and displays them as a horizontal histogram overlaid on price. Unlike fixed-range or visible-range profiles, this indicator uses time-based session segmentation — the profile represents only the bars within the current trading day, updating continuously as each bar closes.
The profile answers a specific question: where was the majority of trading activity concentrated in the current session, and what are the structural reference levels that follow from that activity? The Initial Balance (the range of the first hour of the session) provides context for whether subsequent price behavior is an extension or a rejection.
Core Concepts
1. Volume Profile Calculation
Price range is divided into configurable bins. Each bar's volume is allocated to the bins that overlap its high-low range, proportionally by the fraction of the bar that falls within each bin. The result is an array of volume-at-price values for the session:
2. Point of Control and Value Area
The Point of Control (POC) is the bin with the highest volume — the price level where the most trading occurred. The Value Area is computed using the standard 70% rule: starting from the POC, adjacent bins are added to the value area (choosing the higher-volume adjacent bin each time) until 70% of session volume is captured. The resulting Value Area High (VAH) and Value Area Low (VAL) define the range where value was accepted.
3. Initial Balance
The Initial Balance uses the high and low of the first configurable number of bars after session open (default: first 4 bars on a 15-minute chart = first hour). IB High and IB Low are drawn as horizontal lines across the chart. Price trading above IB High is bullish extension; below IB Low is bearish extension; inside the IB is balance.
4. Histogram Rendering
Volume bins are rendered as horizontal bars extending leftward from the right edge of the session. Bar width is proportional to relative volume. The POC bin uses a distinct color. Value area bins use a softer fill. Bins outside the value area use the dimmest fill. This creates the standard volume profile "bell curve" visualization.
Features
- Session volume profile: Real-time per-session histogram updated bar by bar
- Point of Control (POC): Highest-volume price bin with labeled line
- Value Area (VAH/VAL): 70% volume concentration band with boundary lines
- Initial Balance High/Low: First-session-period range with horizontal level lines
- Configurable bin count: Controls granularity of the volume distribution
- Session reset logic: Profile resets at each new session boundary
- Candle coloring: Candles painted by position relative to POC and value area
- Dashboard: Current POC, VAH, VAL, IB range, and session volume total
Input Parameters
Profile Configuration:
- Number of Bins: Price level granularity for the profile (default: 24)
- IB Bars: Number of bars defining the Initial Balance period (default: 4)
- Session Type: Trading session boundary for profile reset
Display:
- Histogram Width: Maximum bar width in chart bars (default: 30)
- Show POC Line toggle
- Show Value Area toggle
- Show Initial Balance toggle
- Show Candle Color toggle
How to Use This Indicator
Step 1: Identify the POC
The POC is the fair value anchor for the session. Price gravitating toward the POC during a pullback indicates healthy trend behavior. Price unable to hold above or below the POC suggests indecision at current levels.
Step 2: Use Value Area for Range Context
Value area acceptance means price is spending time within the 70% volume zone — a range-bound state. Value area rejection (price rapidly leaving VAH or VAL and not returning) indicates directional conviction.
Step 3: Trade Initial Balance Extensions
A close above IB High with follow-through is a bullish extension signal. A close below IB Low is bearish. Range expansion beyond the IB indicates participants accepting new value outside the opening equilibrium.
Step 4: Watch POC as Support or Resistance
On future pullbacks, the prior session's POC often acts as structural support or resistance. The indicator's persistent level lines provide these reference points across sessions.
Indicator Limitations
- Volume profile interpretation requires practice; mechanical rules based on profile levels without context produce poor results
- On instruments with irregular volume distribution (low-liquidity sessions, gaps), profiles may cluster into unrepresentative patterns
- The 70% value area rule is a convention from Market Profile theory, not a mathematically proven optimal threshold
Originality Statement
The combination of a real-time session volume profile with Initial Balance tracking, candle coloring by value area position, and a live-updating dashboard in a single Pine Script v6 publication provides a self-contained session structure tool. The session-adaptive profile calculation using proportional volume allocation across bins is implemented from first principles, not adapted from another published script.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Volume profile levels are historical references and do not guarantee future price reactions. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
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.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
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.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
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.