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
namestringThe 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
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
timelonginputDoubleArrayThe 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
inputDoubleArrayvolumedoubleaveragePricedouble
Returns
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
timelonginputDoubleArrayvolumedoubleaveragePricedouble
Returns
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
timelonginputDoubleArrayThe value to use to update this indicator