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.
| 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 |
