Lean  $LEAN_TAG$
QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator Class Reference

Volume Weighted Average Price (VWAP) Indicator: It is calculated by adding up the dollars traded for every transaction (price multiplied by number of shares traded) and then dividing by the total shares traded for the day. More...

Inheritance diagram for QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator:
[legend]

Public Member Functions

 VolumeWeightedAveragePriceIndicator (int period)
 Initializes a new instance of the VWAP class with the default name and period More...
 
 VolumeWeightedAveragePriceIndicator (string name, int period)
 Initializes a new instance of the VWAP class with a given name and period More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => VWAP.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => _period
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Protected Member Functions

override decimal ComputeNextValue (TradeBar input)
 Computes the next value of this indicator from the given state More...
 
virtual decimal GetTimeWeightedAveragePrice (TradeBar input)
 Gets an estimated average price to use for the interval covered by the input trade bar. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.TradeBarIndicator
 TradeBarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Protected Attributes

readonly Identity Price
 
readonly Identity Volume
 
CompositeIndicator VWAP
 

Additional Inherited Members

- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

Volume Weighted Average Price (VWAP) Indicator: It is calculated by adding up the dollars traded for every transaction (price multiplied by number of shares traded) and then dividing by the total shares traded for the day.

Definition at line 26 of file VolumeWeightedAveragePriceIndicator.cs.

Constructor & Destructor Documentation

◆ VolumeWeightedAveragePriceIndicator() [1/2]

QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.VolumeWeightedAveragePriceIndicator ( int  period)

Initializes a new instance of the VWAP class with the default name and period

Parameters
periodThe period of the VWAP

Definition at line 40 of file VolumeWeightedAveragePriceIndicator.cs.

◆ VolumeWeightedAveragePriceIndicator() [2/2]

QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.VolumeWeightedAveragePriceIndicator ( string  name,
int  period 
)

Initializes a new instance of the VWAP class with a given name and period

Parameters
namestring - the name of the indicator
periodThe period of the VWAP

Definition at line 50 of file VolumeWeightedAveragePriceIndicator.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.Reset ( )

Resets this indicator to its initial state

Definition at line 75 of file VolumeWeightedAveragePriceIndicator.cs.

Here is the call graph for this function:

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.ComputeNextValue ( TradeBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 88 of file VolumeWeightedAveragePriceIndicator.cs.

Here is the call graph for this function:

◆ GetTimeWeightedAveragePrice()

virtual decimal QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.GetTimeWeightedAveragePrice ( TradeBar  input)
protectedvirtual

Gets an estimated average price to use for the interval covered by the input trade bar.

Parameters
inputThe current trade bar input
Returns
An estimated average price over the trade bar's interval

Definition at line 100 of file VolumeWeightedAveragePriceIndicator.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.IsReady => VWAP.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 65 of file VolumeWeightedAveragePriceIndicator.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.VolumeWeightedAveragePriceIndicator.WarmUpPeriod => _period

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 70 of file VolumeWeightedAveragePriceIndicator.cs.


The documentation for this class was generated from the following file: