Table of Contents

Class ConstantIndicator

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

An indicator that will always return the same value.

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

Constructors

ConstantIndicator(string, DoubleArray)

Creates a new ConstantIndicator that will always return the specified value

public ConstantIndicator(string name, DoubleArray value)

Parameters

name string

The name of this indicator

value DoubleArray

The constant value to be returned

ConstantIndicator(string, double)

Creates a new ConstantIndicator that will always return the specified value

public ConstantIndicator(string name, double value)

Parameters

name string

The name of this indicator

value double

The constant value to be returned

Properties

IsReady

Gets true since the ConstantIndicator is always ready to return the same value

public override bool IsReady { get; }

Property Value

bool

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

Reset()

Resets this indicator to its initial state

public override void Reset()