Volume Weighted Average Price (VWAP)
The Volume Weighted Average Price is a Volume weighted average of price, typically used on intraday data. [Discuss] 💬
// usage IEnumerable<VwapResult> results = quotes.GetVwap(); // usage with optional anchored start date IEnumerable<VwapResult> results = quotes.GetVwap(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
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.
- This method returns a time series of all available indicator values for the
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first period or the
startDatewill have a
Vwap = Closevalue since it is the initial starting point.
startDate, if specified, will be
DateTime - Date from evaluated
double - Volume Weighted Average Price
See Utilities and helpers for more information.
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.