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
namestringThe name of this indicator
valueDoubleArrayThe 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
Properties
IsReady
Gets true since the ConstantIndicator is always ready to return the same value
public override bool IsReady { 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
Reset()
Resets this indicator to its initial state
public override void Reset()