Volume Weighted Average Price (VWAP)

The Volume Weighted Average Price is a Volume weighted average of price, typically used on intraday data. [Discuss] 💬

chart for Volume Weighted Average Price (VWAP)

// C# usage syntax
IEnumerable<VwapResult> results =
  quotes.GetVwap();

// usage with optional anchored start date
IEnumerable<VwapResult> results =
  quotes.GetVwap(startDate);

Parameters

startDate DateTime - Optional. The anchor date used to start the VWAP accumulation. The earliest date in quotes is used when not provided.

Historical quotes requirements

You must have at least one historical quote to calculate; however, more is often needed to be useful. Historical quotes are typically provided for a single day using minute-based intraday periods. Since this is an accumulated weighted average price, different start dates will produce different results. The accumulation starts at the first period in the provided quotes, unless it is specified in the optional startDate parameter.

quotes is a collection of generic TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.

Response

IEnumerable<VwapResult>

VwapResult

Date DateTime - Date from evaluated TQuote

Vwap double - Volume Weighted Average Price

Utilities

See Utilities and helpers for more information.

Chaining

Results can be further processed on Vwap with additional chain-enabled indicators.

// example
var results = quotes
    .GetVwap(..)
    .GetRsi(..);

This indicator must be generated from quotes and cannot be generated from results of another chain-enabled indicator or method.