OPEN-SOURCE SCRIPT
Fixed Range Volume Delta By Sarojh

**Overview**
The **Fixed Range Volume Delta** indicator isolates any specific historical or active trading session and renders native intrabar Volume Delta candlesticks exclusively inside that window. In addition to displaying standard candle-by-candle delta action (open, high, low, close delta spreads), the indicator computes the total aggressive buy volume, aggressive sell volume, cumulative net delta, and overall traded volume across the selected range, summarized in an on-screen metrics dashboard.
---
**Key Features**
* **Custom Range Selection:** Define exact start and end timestamps via the calendar picker, or toggle **"Extend to Current Bar"** to track an accumulation or distribution structure up to the live candle.
* **Native Delta Candlesticks:** Uses `ta.requestVolumeDelta()` to construct precise intrabar delta candles (`openVolume`, `maxVolume`, `minVolume`, `lastVolume`) with visible wicks, matching native order-flow delta charts without distorting the pane's vertical price scale.
* **Separated Buy vs. Sell Volume Accounting:** Deconstructs net delta and gross volume to calculate true aggressive market buys ($V_{\text{buy}}$) and aggressive market sells ($V_{\text{sell}}$) across the entire selected range.
* **Range Metrics Dashboard:** A clean, auto-scaling table positioned in the top-right corner displaying:
* **Total Volume:** Gross volume transacted inside the window.
* **Buy Volume:** Aggressive market buy volume.
* **Sell Volume:** Aggressive market sell volume.
* **Net Delta:** Cumulative net difference ($V_{\text{buy}} - V_{\text{sell}}$) with dynamic teal/red status coloring.
* **Multi-Timeframe Granularity:** Select between standard time-based lower-timeframe aggregation or 1-tick aggregation (requires supported TradingView plans).
---
**How to Use & Read the Indicator**
1. **Spotting Absorption & Hidden Divergences:**
* **Bullish Absorption:** When price holds sideways or forms a consolidation base while Cumulative Net Delta is heavily negative, it signals that aggressive market sellers are being absorbed by passive institutional limit buy orders (bids).
* **Bearish Absorption:** When price consolidates near resistance while Cumulative Net Delta is heavily positive without making upward progress, it indicates that aggressive market buyers are being absorbed into passive sell orders (asks).
2. **Measuring Phase Turnover:** Isolate consolidation zones, Wyckoff accumulation/distribution ranges, or breakout retests to assess whether buyers or sellers were dominant during the sideways build-up.
3. **Session Anchoring:** Measure specific trading sessions (e.g., London Open to NY Close, or weekend crypto ranges) to gauge net inventory positioning leading into the next expansion.
---
**Settings**
* **Start Date & Time:** Sets the anchor point where accumulation and visual candle plotting begin.
* **Extend to Current Bar:** When enabled, ignores the fixed End Date and dynamically calculates volume up to the most recent bar.
* **End Date & Time:** Sets the cut-off timestamp for fixed historical ranges.
* **Data Aggregation:** Switch between **Time** (standard lower-timeframe approximation) and **1 tick** (exact tick-by-tick order execution).
* **Use Custom Timeframe:** Manually specify the lower timeframe resolution scanned for the delta calculation.
The **Fixed Range Volume Delta** indicator isolates any specific historical or active trading session and renders native intrabar Volume Delta candlesticks exclusively inside that window. In addition to displaying standard candle-by-candle delta action (open, high, low, close delta spreads), the indicator computes the total aggressive buy volume, aggressive sell volume, cumulative net delta, and overall traded volume across the selected range, summarized in an on-screen metrics dashboard.
---
**Key Features**
* **Custom Range Selection:** Define exact start and end timestamps via the calendar picker, or toggle **"Extend to Current Bar"** to track an accumulation or distribution structure up to the live candle.
* **Native Delta Candlesticks:** Uses `ta.requestVolumeDelta()` to construct precise intrabar delta candles (`openVolume`, `maxVolume`, `minVolume`, `lastVolume`) with visible wicks, matching native order-flow delta charts without distorting the pane's vertical price scale.
* **Separated Buy vs. Sell Volume Accounting:** Deconstructs net delta and gross volume to calculate true aggressive market buys ($V_{\text{buy}}$) and aggressive market sells ($V_{\text{sell}}$) across the entire selected range.
* **Range Metrics Dashboard:** A clean, auto-scaling table positioned in the top-right corner displaying:
* **Total Volume:** Gross volume transacted inside the window.
* **Buy Volume:** Aggressive market buy volume.
* **Sell Volume:** Aggressive market sell volume.
* **Net Delta:** Cumulative net difference ($V_{\text{buy}} - V_{\text{sell}}$) with dynamic teal/red status coloring.
* **Multi-Timeframe Granularity:** Select between standard time-based lower-timeframe aggregation or 1-tick aggregation (requires supported TradingView plans).
---
**How to Use & Read the Indicator**
1. **Spotting Absorption & Hidden Divergences:**
* **Bullish Absorption:** When price holds sideways or forms a consolidation base while Cumulative Net Delta is heavily negative, it signals that aggressive market sellers are being absorbed by passive institutional limit buy orders (bids).
* **Bearish Absorption:** When price consolidates near resistance while Cumulative Net Delta is heavily positive without making upward progress, it indicates that aggressive market buyers are being absorbed into passive sell orders (asks).
2. **Measuring Phase Turnover:** Isolate consolidation zones, Wyckoff accumulation/distribution ranges, or breakout retests to assess whether buyers or sellers were dominant during the sideways build-up.
3. **Session Anchoring:** Measure specific trading sessions (e.g., London Open to NY Close, or weekend crypto ranges) to gauge net inventory positioning leading into the next expansion.
---
**Settings**
* **Start Date & Time:** Sets the anchor point where accumulation and visual candle plotting begin.
* **Extend to Current Bar:** When enabled, ignores the fixed End Date and dynamically calculates volume up to the most recent bar.
* **End Date & Time:** Sets the cut-off timestamp for fixed historical ranges.
* **Data Aggregation:** Switch between **Time** (standard lower-timeframe approximation) and **1 tick** (exact tick-by-tick order execution).
* **Use Custom Timeframe:** Manually specify the lower timeframe resolution scanned for the delta calculation.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.