OPEN-SOURCE SCRIPT

Projected Volume (Intraperiod Estimate)

403
Projected Volume (Intraperiod Estimate)
════════════════════════════════════════

OVERVIEW

Projected Volume replaces the standard volume study with a live, forward-looking
estimate of where the current bar's volume is likely to finish. Volume is only
known with certainty once a bar closes, which makes it hard to judge in real time
whether the bar in progress is trading heavy or light. This indicator solves that
by drawing the volume already traded as a solid column and projecting the
remaining, not-yet-traded volume as a hollow cap on top — so the anticipated
final volume of the developing bar is visible at a glance. The projection is
rebuilt on every update of the live bar and adapts to your chart timeframe and to
the data your subscription can access.


WHAT IT PLOTS

• Directional volume columns on every bar — green when close ≥ open, red when
close < open (the standard volume read you already use).
• On the current, unfinished bar only:
– a solid column for the volume traded so far;
– a hollow outline extending from the top of the solid column up to the
projected final volume;
– an optional label with the projected total and the percent of the period
elapsed.

As the bar fills in, the solid portion grows and the hollow cap shrinks toward
zero. At the close, projected equals actual.


HOW THE PROJECTION WORKS

The indicator uses two methods and selects between them automatically based on
whether sub-bar (intrabar) data is available.

1) Intraperiod volume profile — primary method

For each of the last N completed bars, the script requests lower-timeframe
volume and measures how volume accumulates through the period: what fraction of
the period's total volume is typically complete by the end of each time-slice —
the classic "how much of the day's volume is usually done by the first hour, the
second hour…" shape. That cumulative curve is averaged across the lookback window
to form a typical accumulation profile.

For the developing bar the script determines how far through the period it has
progressed, reads the typical cumulative fraction f at that point, and estimates:

projected total = volume so far ÷ f

Because the profile captures the real intraperiod shape — the U-shaped session
volume common in equities, or the flatter distribution of 24/7 crypto — the
estimate reflects typical behavior rather than assuming volume arrives at a
constant rate.

2) Average-of-increment — base-resolution fallback

When the chart is already at the lowest interval your data plan provides (for
example a 1-minute chart on a plan without seconds data), there is no sub-bar to
sample and the profile method does not apply. In that case the script projects:

projected total = volume so far + (1 − elapsed) × average volume of last N bars

This equals a typical bar early in the period, tracks the realized volume as the
bar fills, always sits at or above the volume already traded, and converges to
the actual figure at the close. It requires no lower-timeframe data and cannot
error. Elapsed time is measured from the clock, so no sub-bar feed is needed.

Automatic method selection

The script detects whether a usable lower timeframe exists that your plan can
serve. If so, it uses the profile method — and floors sub-sampling at one minute,
so 5m / 15m / 1h charts still build a genuine profile from 1-minute intrabars. If
not, it uses the average-of-increment fallback. The active method is shown in the
on-chart label, where a "· avg" suffix denotes fallback mode.


SETTINGS

Intraperiod slices (12 / 24 / 48) — number of time-slices used to model the
accumulation curve within each period. 24 is roughly hourly on a daily chart.
Lookback periods — number of completed bars averaged for the profile and the
fallback average (default 30).
Auto sub-period timeframe — when on, the script chooses the intrabar sampling
resolution automatically. Turn off to set it manually.
Manual sub-period timeframe — used when Auto is off; must be lower than the
chart timeframe.
Allow seconds sub-sampling — off by default. Enable only if your plan provides
seconds data; when off, the script never requests sub-minute data and therefore
cannot error on a 1-minute chart.
Min % elapsed before projecting — suppresses unstable projections in the
opening moments of a new bar.
• Up / Down volume colors and a toggle for the projection label.


READING THE LABEL

The label reads, for example, "Proj 1.2M (35% elapsed)" — the projected final
volume and how far the current period has progressed. A "· avg" suffix indicates
the average-of-increment fallback is active because intrabar data is unavailable
at that resolution.


BEHAVIOR, NOTES & LIMITATIONS

• Real-time by design. The projection exists only on the current, unfinished bar
and recalculates as that bar develops. Historical bars display actual traded
volume only — the indicator does not restate closed bars, but the live estimate
moves tick to tick as new volume arrives. This is expected behavior for a
forward projection, not hidden repainting.
• It is an estimate, not a guarantee. Accuracy is lowest in the first fraction of
a new bar and improves as the bar fills; the "Min % elapsed" input guards the
earliest, noisiest moments.
• The profile method depends on intrabar data availability, which varies by
symbol and subscription. Where it is unavailable, the indicator degrades
gracefully to the average-based method.
• Works across asset classes and timeframes. Because elapsed progress is measured
from intrabar count where available (and otherwise from the clock), it adapts to
both continuous (crypto) and session-based (equities/futures) markets.
• Volume reflects the data feed of the chart's symbol; index or aggregated tickers
may report volume differently from a single exchange.


CONCEPT

The tool pairs a standard directional volume histogram with an
intraperiod-accumulation model and presents the realized-versus-projected split
visually as a filled column plus a hollow cap. The aim is a single, glanceable
read on whether the bar in progress is on pace to finish heavy or light relative
to recent norms.

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.