Class RateOfChangePercent
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n
public class RateOfChangePercent : RateOfChange, IIndicator, IUpdatable
- Inheritance
-
RateOfChangePercent
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
RateOfChangePercent(int)
Creates a new RateOfChangePercent indicator with the specified period
public RateOfChangePercent(int period)
Parameters
periodintThe period over which to perform to computation
RateOfChangePercent(string, int)
Creates a new RateOfChangePercent indicator with the specified period
public RateOfChangePercent(string name, int period)
Parameters
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