Table of Contents

Class IntradayVwap

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

Defines the canonical intraday VWAP indicator

public class IntradayVwap : IndicatorBase, IIndicator, IUpdatable
Inheritance
IntradayVwap
Implements
Inherited Members
Extension Methods

Constructors

IntradayVwap(string)

Initializes a new instance of the IntradayVwap class

public IntradayVwap(string name)

Parameters

name string

The name of the indicator

Properties

IsReady

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

public override bool IsReady { get; }

Property Value

bool

Methods

Forward(long, DoubleArray)

Computes the next value of this indicator from the given state. NOTE: This must be overriden since it's abstract in the base, but will never be invoked since we've override the validate method above.

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

TryGetVolumeAndAveragePrice(DoubleArray, out double, out double)

Determines the volume and price to be used for the current input in the VWAP computation

protected bool TryGetVolumeAndAveragePrice(DoubleArray input, out double volume, out double averagePrice)

Parameters

input DoubleArray
volume double
averagePrice double

Returns

bool

TryGetVolumeAndAveragePrice(long, DoubleArray, out double, out double)

Determines the volume and price to be used for the current input in the VWAP computation

protected bool TryGetVolumeAndAveragePrice(long time, DoubleArray input, out double volume, out double averagePrice)

Parameters

time long
input DoubleArray
volume double
averagePrice double

Returns

bool

Update(long, DoubleArray)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

public override void Update(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The value to use to update this indicator