Class Momentum
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the n-period change in a value using the following: value_0 - value_n
public class Momentum : WindowIndicator, IIndicator, IUpdatable
- Inheritance
-
Momentum
- Implements
- Inherited Members
- Extension Methods
Constructors
Momentum(int)
Creates a new Momentum indicator with the specified period
public Momentum(int period)
Parameters
periodintThe period over which to perform to computation
Momentum(string, int)
Creates a new Momentum indicator with the specified period
public Momentum(string name, int period)
Parameters
Properties
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(IReadOnlyWindow<long>, IReadOnlyWindow<DoubleArray>, long, DoubleArray)
Computes the next value for this indicator from the given state.
protected override DoubleArray Forward(IReadOnlyWindow<long> timeWindow, IReadOnlyWindow<DoubleArray> window, long time, DoubleArray input)
Parameters
timeWindowIReadOnlyWindow<long>windowIReadOnlyWindow<DoubleArray>The window of data held in this indicator
timelonginputDoubleArrayThe input value to this indicator on this time step
Returns
- DoubleArray
A new value for this indicator