Table of Contents

Class VolumeWeightedAveragePriceIndicator

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

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.

public class VolumeWeightedAveragePriceIndicator : TradeBarIndicator, IIndicator, IUpdatable
Inheritance
VolumeWeightedAveragePriceIndicator
Implements
Inherited Members
Extension Methods

Constructors

VolumeWeightedAveragePriceIndicator(int)

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

public VolumeWeightedAveragePriceIndicator(int period)

Parameters

period int

The period of the VWAP

VolumeWeightedAveragePriceIndicator(string, int)

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

public VolumeWeightedAveragePriceIndicator(string name, int period)

Parameters

name string

string - the name of the indicator

period int

The period of the VWAP

Properties

IsReady

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

public override bool IsReady { get; }

Property Value

bool

WarmUpPeriod

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

public override int WarmUpPeriod { get; }

Property Value

int

Methods

Forward(long, DoubleArray)

Computes the next value of this indicator from the given state

protected override DoubleArray Forward(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The input given to the indicator

Returns

DoubleArray

A new value for this indicator

GetTimeWeightedAveragePrice(DoubleArray)

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

protected virtual double GetTimeWeightedAveragePrice(DoubleArray input)

Parameters

input DoubleArray

The current trade bar input

Returns

double

An estimated average price over the trade bar's interval

Reset()

Resets this indicator to its initial state

public override void Reset()