Class Identity
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given.
public class Identity : Indicator, IIndicator, IUpdatable
- Inheritance
-
Identity
- Implements
- Inherited Members
- Extension Methods
Constructors
Identity(string, int, int, bool)
Initializes a new instance of the Identity indicator with the specified name
public Identity(string name, int outputCount = 1, int outputProperties = 1, bool setReady = false)
Parameters
namestringThe name of the indicator
outputCountintSets the OutputCount of this Identity
outputPropertiesintSets the Properties of this Identity
setReadyboolIf set to true, IsReady will be always true
Properties
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
Properties
The number of properties Current will have.
public override int Properties { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
- DoubleArray
A new value for this indicator
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