PROTECTED SOURCE SCRIPT

Volume Profile [Stansbooth]

29
Volume Profile
What This Indicator Does ?

Volume Profile displays how trading volume is distributed across price levels for a selected period.
Instead of showing volume per candle only, it shows **where price attracted the most volume**, helping traders identify **important price zones**.

The indicator dynamically builds a **horizontal volume profile** using historical candle data and visually presents it behind price candles.

📊 Volume Profile Calculation Logic

* Volume is distributed across price levels based on how much of each candle overlaps a price row.
* Each candle’s volume is split equally across the price levels it touches.
* Bullish candles contribute volume to the **Buy Volume** array.
* Bearish candles contribute volume to the **Sell Volume** array.
* Total volume per level = Buy Volume + Sell Volume.

This creates a **precise volume-at-price profile**.


⏱️ Profile Period Modes

You can choose how the volume profile is calculated:

* **Visible Range** – Profile is calculated for all currently visible bars
* **Daily** – New profile starts each trading day
* **Weekly** – New profile starts each week
* **Monthly** – New profile starts each month
* **Session** – Profile resets on each new session

When a period ends, the completed profile is drawn and a new one starts automatically.

---

🎯 POC & Value Area Logic

* **POC (Point of Control)**

* The price level with the **highest traded volume**
* Drawn as a horizontal line across the profile

* **Value Area**

* Covers the percentage of total volume defined by **Value Area %**
* Starts from the POC and expands upward and downward until the target volume is reached
* Areas outside the Value Area are visually dimmed


📐 Profile Drawing Behavior

* The profile width is proportional to volume strength:

* Higher volume = wider bar
* Lower volume = narrower bar
* Profile width is calculated using **time-based scaling**, ensuring stability across all timeframes
* Profiles can be placed on the **left or right side** of the chart
* Multiple past profiles can be displayed (limited by settings)

🕯️ Candle Volume Visualization

* Candle colors are dynamically adjusted based on **relative volume**
* Higher-than-average volume candles appear more intense
* Lower-volume candles appear more transparent
* Optional volume text can be displayed above candles

This helps visually confirm **strong vs weak price moves**.

🔍 High Volume Spike Detection

* Detects candles where volume exceeds a user-defined multiple of the 20-bar average
* Such candles are marked with a visual symbol below the bar
* Useful for spotting:

* Breakouts
* Institutional participation
* High-interest zones

📊 Bottom Volume Chart Logic

* Displays a volume histogram at the bottom of the chart
* Volume bars are dynamically scaled to price range
* Bullish and bearish candles use different colors
* Uses plot & fill logic, allowing **unlimited historical volume display**

🧭 How to Use This Indicator

1. **Identify High-Volume Zones**

* Use the widest profile areas to find strong support and resistance

2. **Trade Around the POC**

* Price often reacts, consolidates, or reverses near the POC

3. **Use Value Area for Bias**

* Price above Value Area → bullish bias
* Price below Value Area → bearish bias

4. **Confirm Moves with Candle Volume**

* Strong moves with high volume are more reliable
* Weak moves with low volume may fail

5. **Watch Volume Spikes**

* Spikes often precede major moves or reversals

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.