OPEN-SOURCE SCRIPT
Actualizado POC Volume Profile

# POC Volume Profile
Adapted from "CUSTOM RANGE VOLUME PROFILE PRO" by WillyAlgoTrader.
This indicator builds a Volume Profile over a user-defined range and displays the Point of Control (POC), Value Area High/Low (VAH/VAL), VWAP, and a Delta breakdown — all in a single, clean overlay. It features an Auto Range Mode that automatically determines the profile start using pivot highs and lows, eliminating the need to manually set dates every time the market moves.
---
## How It Works
The indicator divides the selected price range into a configurable number of bins and distributes each bar's volume proportionally across the bins it overlaps. The bin with the highest accumulated volume becomes the POC. The Value Area is then expanded outward from the POC until the target percentage of total volume is enclosed.
---
## Modes
**Manual Date Range (Auto Range OFF)**
Set a fixed Start Date and End Date. The profile is calculated over that exact period. Useful when you want to analyze a specific session, week, or swing.
**Auto Range Mode (Auto Range ON)**
The profile start is determined automatically using pivot highs and/or lows. You control which pivot becomes the start point using the "Nearest Nth Pivot" setting. The profile always ends at the current bar.
---
## Auto Range Mode — Settings
**Pivot Length**
Controls how many bars on each side are required to confirm a pivot high or low. Higher values produce fewer but more significant pivots.
**Show Pivot High Markers 🟢**
Draws a small green circle above each confirmed pivot high bar. When this is the only toggle enabled, only pivot highs are considered for the start point selection.
**Show Pivot Low Markers 🔴**
Draws a small red circle below each confirmed pivot low bar. When this is the only toggle enabled, only pivot lows are considered for the start point selection.
**Nearest Nth Pivot**
Determines which pivot becomes the profile start.
- Set to 1 → the most recent pivot is used.
- Set to 3 (default) → the 3rd most recent pivot is used.
- When both High and Low markers are enabled, all pivots are merged into a single list ranked by recency. The Nth pivot in that combined list — regardless of whether it is a high or a low — becomes the start point.
- Increasing this value moves the start further back in time; decreasing it brings it closer to the current bar.
---
## Profile Settings
**Profile Bins**
Number of price levels the range is divided into. More bins = finer granularity. Fewer bins = smoother, broader view. Range: 10–100. Default: 40.
**Value Area %**
The percentage of total volume that defines the Value Area. The Value Area expands from the POC outward until this threshold is reached. Default: 68 (the standard one-sigma zone used in market profile theory). Can be set between 1 and 100.
---
## Visual Settings
**Show Volume Profile**
Toggles the histogram bars on/off.
**Show Delta Profile**
When enabled, each histogram bar is split into buy-side (bullish candle volume) and sell-side (bearish candle volume) segments, color-coded separately. When disabled, a single base color is used.
**Show POC Line**
Draws a horizontal line at the Point of Control — the price level with the highest volume in the range.
**Show POC Zone Fill**
Highlights the POC bin with a semi-transparent fill box spanning the full range.
**Show Value Area**
Draws dashed lines at the Value Area High (VAH) and Value Area Low (VAL).
**Show VWAP**
Draws the Volume Weighted Average Price line for the selected range.
**Show Range Label**
Displays a summary label at the end of the range showing total volume. Hover over it for a tooltip with full stats (bars, volume, delta, POC, VWAP).
**Theme**
Auto (follows chart background), Dark, or Light. Affects the dashboard and label colors.
---
## Dashboard
The dashboard panel shows a live summary of the current profile:
| Field | Description |
|---------|--------------------------------------------------|
| Mode | Auto (Pivot) or Manual (Date) |
| POC | Point of Control price |
| VA % | Value Area High — Value Area Low range |
| VWAP | Volume Weighted Average Price for the range |
| Volume | Total volume in the range |
| POC Vol | Volume accumulated at the POC bin |
| Delta | Buy/sell imbalance as % of total volume |
| Bars | Number of bars in the profile range |
Dashboard position can be set to Top Left, Top Right, Bottom Left, or Bottom Right.
---
## Colors
All colors are fully customizable:
- **Buy Volume** — color for bullish volume bars (Delta Profile)
- **Sell Volume** — color for bearish volume bars (Delta Profile)
- **Base Volume** — color used when Delta Profile is disabled
- **POC Line** — color of the POC horizontal line and fill
- **VAH Line** — color of the Value Area High line
- **VAL Line** — color of the Value Area Low line
- **VWAP** — color of the VWAP line
---
## Notes
- In Auto Range Mode, the profile is fully recalculated on every bar update. Changing the Nth Pivot value or toggling the High/Low markers immediately updates the profile start.
- The indicator draws on the last bar only (no historical repainting of boxes/lines).
- If the selected range exceeds 4900 bars, the profile will not render. Reduce the range or use a higher timeframe.
- Pivot confirmation requires `Pivot Length` bars to form on both sides, so the most recent pivots visible on chart may not yet be confirmed and will not appear in the list.
Adapted from "CUSTOM RANGE VOLUME PROFILE PRO" by WillyAlgoTrader.
This indicator builds a Volume Profile over a user-defined range and displays the Point of Control (POC), Value Area High/Low (VAH/VAL), VWAP, and a Delta breakdown — all in a single, clean overlay. It features an Auto Range Mode that automatically determines the profile start using pivot highs and lows, eliminating the need to manually set dates every time the market moves.
---
## How It Works
The indicator divides the selected price range into a configurable number of bins and distributes each bar's volume proportionally across the bins it overlaps. The bin with the highest accumulated volume becomes the POC. The Value Area is then expanded outward from the POC until the target percentage of total volume is enclosed.
---
## Modes
**Manual Date Range (Auto Range OFF)**
Set a fixed Start Date and End Date. The profile is calculated over that exact period. Useful when you want to analyze a specific session, week, or swing.
**Auto Range Mode (Auto Range ON)**
The profile start is determined automatically using pivot highs and/or lows. You control which pivot becomes the start point using the "Nearest Nth Pivot" setting. The profile always ends at the current bar.
---
## Auto Range Mode — Settings
**Pivot Length**
Controls how many bars on each side are required to confirm a pivot high or low. Higher values produce fewer but more significant pivots.
**Show Pivot High Markers 🟢**
Draws a small green circle above each confirmed pivot high bar. When this is the only toggle enabled, only pivot highs are considered for the start point selection.
**Show Pivot Low Markers 🔴**
Draws a small red circle below each confirmed pivot low bar. When this is the only toggle enabled, only pivot lows are considered for the start point selection.
**Nearest Nth Pivot**
Determines which pivot becomes the profile start.
- Set to 1 → the most recent pivot is used.
- Set to 3 (default) → the 3rd most recent pivot is used.
- When both High and Low markers are enabled, all pivots are merged into a single list ranked by recency. The Nth pivot in that combined list — regardless of whether it is a high or a low — becomes the start point.
- Increasing this value moves the start further back in time; decreasing it brings it closer to the current bar.
---
## Profile Settings
**Profile Bins**
Number of price levels the range is divided into. More bins = finer granularity. Fewer bins = smoother, broader view. Range: 10–100. Default: 40.
**Value Area %**
The percentage of total volume that defines the Value Area. The Value Area expands from the POC outward until this threshold is reached. Default: 68 (the standard one-sigma zone used in market profile theory). Can be set between 1 and 100.
---
## Visual Settings
**Show Volume Profile**
Toggles the histogram bars on/off.
**Show Delta Profile**
When enabled, each histogram bar is split into buy-side (bullish candle volume) and sell-side (bearish candle volume) segments, color-coded separately. When disabled, a single base color is used.
**Show POC Line**
Draws a horizontal line at the Point of Control — the price level with the highest volume in the range.
**Show POC Zone Fill**
Highlights the POC bin with a semi-transparent fill box spanning the full range.
**Show Value Area**
Draws dashed lines at the Value Area High (VAH) and Value Area Low (VAL).
**Show VWAP**
Draws the Volume Weighted Average Price line for the selected range.
**Show Range Label**
Displays a summary label at the end of the range showing total volume. Hover over it for a tooltip with full stats (bars, volume, delta, POC, VWAP).
**Theme**
Auto (follows chart background), Dark, or Light. Affects the dashboard and label colors.
---
## Dashboard
The dashboard panel shows a live summary of the current profile:
| Field | Description |
|---------|--------------------------------------------------|
| Mode | Auto (Pivot) or Manual (Date) |
| POC | Point of Control price |
| VA % | Value Area High — Value Area Low range |
| VWAP | Volume Weighted Average Price for the range |
| Volume | Total volume in the range |
| POC Vol | Volume accumulated at the POC bin |
| Delta | Buy/sell imbalance as % of total volume |
| Bars | Number of bars in the profile range |
Dashboard position can be set to Top Left, Top Right, Bottom Left, or Bottom Right.
---
## Colors
All colors are fully customizable:
- **Buy Volume** — color for bullish volume bars (Delta Profile)
- **Sell Volume** — color for bearish volume bars (Delta Profile)
- **Base Volume** — color used when Delta Profile is disabled
- **POC Line** — color of the POC horizontal line and fill
- **VAH Line** — color of the Value Area High line
- **VAL Line** — color of the Value Area Low line
- **VWAP** — color of the VWAP line
---
## Notes
- In Auto Range Mode, the profile is fully recalculated on every bar update. Changing the Nth Pivot value or toggling the High/Low markers immediately updates the profile start.
- The indicator draws on the last bar only (no historical repainting of boxes/lines).
- If the selected range exceeds 4900 bars, the profile will not render. Reduce the range or use a higher timeframe.
- Pivot confirmation requires `Pivot Length` bars to form on both sides, so the most recent pivots visible on chart may not yet be confirmed and will not appear in the list.
Notas de prensa
pictureScript de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.