Buy/Sell Volume Totals for Period
Jan 5, 2022

The Buy/Sell Volume Totals for Period indicator calculates and aggregates intraday buying and selling pressure within a user-defined timeframe to help identify phases of Wyckoff accumulation or distribution.
Usage
The Usage section describes how the script can be used to analyze volume dynamics over a specific trading range. By defining a start and end date, traders can isolate a specific price structure—such as a consolidation or a trading range—to see if the net volume flow supports a bullish or bearish breakout.
- Identifying Accumulation: When the cumulative buy volume exceeds the cumulative sell volume within the selected period, the background colors green. This suggests that demand is absorbing supply, a key characteristic of Wyckoff accumulation.
- Identifying Distribution: When the cumulative sell volume is greater than the cumulative buy volume, the background colors red. This indicates that supply is overwhelming demand, pointing toward potential distribution.
- Monitoring Volume Ratios: Users can track the ratio of total buy volume to total sell volume. A ratio significantly above 1.0 indicates strong buying dominance, while a ratio below 1.0 suggests selling dominance.
Details
The script calculates buy and sell volume for each candle based on price action relative to the candle's range. If the close is near the high, a larger portion of the volume is attributed to buying; if the close is near the low, more is attributed to selling.
The core logic aggregates these values starting from the "Start Time" input. If "Use End Time" is enabled, the calculation stops at the specified date; otherwise, it continues to the current candle. The indicator uses a proportional volume algorithm:
- Buy Volume: $Volume \times \frac{Close - Low}{High - Low}$
- Sell Volume: $Volume \times \frac{High - Close}{High - Low}$
This methodology provides a more granular view of volume flow than standard volume bars by segmenting the internal pressure of every candle before totaling them over the period.
Settings
- Start Time: Determines the beginning of the period for volume aggregation.
- Use End Time?: A toggle to decide whether the calculation should stop at a specific date or continue to the most recent data.
- End Time: Determines the concluding timestamp for the volume aggregation if "Use End Time?" is active.
FAQ
How do I interpret the background colors? A green background indicates that total buy volume is currently higher than total sell volume for the selected period, suggesting accumulation. A red background indicates that total sell volume is higher, suggesting distribution.
Can I use this for any timeframe? Yes, the indicator can be applied to any timeframe. However, it is most effective when the start and end times are aligned with significant market pivots or the start of a recognized Wyckoff trading range.
How do I access Buy/Sell Volume Totals for Period? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.