OPEN-SOURCE SCRIPT

Structure Break Volume Profile

5 094

Structure Break Volume Profile combines confirmed market structure breaks with a volume profile of the structure completed before a Change of Character (CHoCH).

The indicator detects confirmed swing highs and lows, classifies structural breaks as BOS or CHoCH, and analyzes the volume distribution of the previous completed market structure. It then identifies the structure’s most relevant volume areas, including:

Point of Control — POC
High Volume Nodes — HVN
Low Volume Nodes — LVN
Estimated Ask/Bid pressure
Bullish and bearish structure transitions
The main objective is to provide additional context after a structural reversal. Instead of evaluating CHoCH only as a price event, the indicator shows where volume was concentrated within the structure that existed before the break.

Market Structure Logic
The indicator uses confirmed pivot highs and pivot lows to determine market structure.

Structural breaks are classified as:

BOS — Break of Structure: A continuation break in the current structural direction.
CHoCH — Change of Character: A break against the previous structural direction, suggesting a potential transition or reversal.
The volume profile is generated only when a CHoCH occurs.

A BOS does not create a new profile and does not delete the active CHoCH profile.

Previous Structure Selection
When a bearish CHoCH occurs, the indicator analyzes the completed bullish structure.

It tracks:

The highest confirmed pivot of the bullish structure
The lowest confirmed pivot of the bullish structure
All eligible volume activity before the bearish CHoCH bar
When a bullish CHoCH occurs, the same process is applied to the completed bearish structure.

This allows the volume profile to represent the full price range of the structure that existed before the directional transition.

Volume Profile
The profile divides the completed structure’s price range into configurable rows and distributes historical volume across those price levels.

The default number of rows is 50.

Two visual architectures are available:

Ask/Bid
This is the default profile style.

Each volume row is divided into:

Green estimated buyer/Ask pressure
Red estimated seller/Bid pressure
The estimated pressure split is derived from the candle close location within its high-low range.

Total Volume
This mode displays each row as a unified total-volume histogram without separating estimated buyer and seller pressure.

The profile can be aligned to either side of the completed structure:

Left
Right
The default profile position is Left.

Point of Control — POC
The POC represents the price row with the highest total volume inside the completed structure.

The POC:

Is calculated from total row volume
Is projected toward the latest candles
Updates its right endpoint as new bars appear
Uses the configurable Bars to Right distance
Includes a label with its direction and numerical price
Can be used as a potential retest, reaction, acceptance, or rejection level
Bullish and bearish POC retest alert conditions are included.

High Volume Nodes — HVN
HVNs represent significant local volume peaks outside the POC row.

These areas may indicate:

Strong historical participation
Price acceptance
Consolidation zones
Potential support or resistance
Areas where price may slow down or rotate
HVNs are displayed as horizontal projected columns. Each column begins at its corresponding profile row and extends toward the latest candles.

HVN settings include:

Maximum HVN count
Minimum volume relative to POC
Minimum row spacing
Column color
Column transparency
Label visibility
Label size
Label offset
Each HVN label includes its rank and numerical price.

Low Volume Nodes — LVN
LVNs represent significant local volume troughs inside the completed structure.

These areas may indicate:

Low historical participation
Price rejection
Inefficient auction zones
Potential acceleration areas
Levels price may move through quickly
LVNs are displayed as horizontal projected columns with dotted borders.

Their color follows the CHoCH direction:

Bullish CHoCH: green LVN columns
Bearish CHoCH: red LVN columns
LVN settings include:

Show or hide LVN columns
Maximum LVN count
Maximum volume relative to POC
Minimum row spacing
Column transparency
Label visibility
Label size
Label offset
Each LVN label includes its rank and numerical price.

LVN columns are disabled by default to keep the chart clean.

Labels
All primary labels include numerical price values:

BOS price
CHoCH price
POC price
HVN price
LVN price
Independent size controls are available for:

BOS/CHoCH labels
POC labels
HVN labels
LVN labels
All label sizes default to Normal.

Important Settings
Fractal Length
Controls the pivot confirmation window.

The default input is 12. Because the internal pivot window is normalized to an odd value, an even input is automatically increased by one.

Larger values detect broader market structures but produce fewer and later signals. Smaller values react faster but detect more minor structures.

Break Confirmation
Two break modes are available:

Close beyond the level
Wick beyond the level
Close-based confirmation is enabled by default.

Bars to Right
Controls how far POC, HVN, and LVN elements extend beyond the latest candle.

The default value is 5.

Profile Source Bars
Controls the maximum historical storage used to calculate the latest CHoCH profile.

Increasing this value may help with very large structures but requires more processing.

Suggested Workflow
Identify the latest bullish or bearish CHoCH.
Observe the completed structure’s volume distribution.
Use the POC as the primary high-volume reference.
Use HVNs as potential acceptance or rotation areas.
Use LVNs as potential rejection or acceleration areas.
Compare the CHoCH direction with the profile’s estimated buyer and seller pressure.
Wait for price to revisit POC, HVN, or LVN areas.
Combine the reaction with trend, liquidity, momentum, volatility, or higher-timeframe context.
Watermark
An optional erdensedat watermark is displayed at the bottom center of the chart.

It is enabled by default and can be disabled from the Display settings.

Data and Calculation Notes
The indicator uses confirmed pivots, meaning structure detection occurs only after the required right-side bars are available. This reduces pivot repainting but introduces confirmation delay.

Standard Pine Script OHLCV data does not provide true exchange-level bid and ask execution data. Therefore, the Ask/Bid profile is an approximation based on candle structure and close location. It should not be interpreted as true footprint, order-flow delta, or exchange aggressor-side volume.

On symbols without reliable volume data, the script may use bar activity as a fallback so the profile can still be displayed.

For close-confirmed signals, users should consider creating alerts with Once Per Bar Close to avoid acting on an unfinished realtime candle.

Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, trading, or professional advice. Market structure, volume profiles, POC, HVN, LVN, and estimated Ask/Bid pressure do not guarantee future price behavior. Historical performance and past reactions are not indicative of future results. Always conduct your own research, use appropriate risk management, and consult a qualified financial professional before making trading or investment decisions.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。