Table of Contents

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

name string

The name of the indicator

outputCount int

Sets the OutputCount of this Identity

outputProperties int

Sets the Properties of this Identity

setReady bool

If 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

bool

Properties

The number of properties Current will have.

public override int Properties { 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

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