VWAP is a formula plus an anchor
The numerator accumulates price multiplied by volume. The denominator accumulates volume. The anchor decides when both totals reset. A daily indicator, a broker session, a week, and an event-anchored calculation can produce different lines from the same bars.
Typical price using high, low, and close is one common source, but close-only or another defined source is also possible. The page or indicator name should state that choice.
Use this daily reset example on intraday charts. Daily or higher bars do not reconstruct intraday VWAP. If the oldest loaded history starts partway through a day, that first day is only a partial accumulation; load earlier bars before comparing it with a complete session.
| Decision | Example in this code | Alternative |
|---|---|---|
| Price source | (high + low + close) / 3 | Close or another defined price |
| Weight | tick_volume | Verified broker-provided real volume |
| Anchor | Calendar day in server timestamps | Session, week, or event |
| Zero denominator | EMPTY_VALUE | Carry-forward only if explicitly intended |
