Class RateOfChangeRatio
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice
public class RateOfChangeRatio : RateOfChange, IIndicator, IUpdatable
- Inheritance
-
RateOfChangeRatio
- Implements
- Inherited Members
- Extension Methods
Constructors
RateOfChangeRatio(int)
Initializes a new instance of the RateOfChangeRatio class using the specified period.
public RateOfChangeRatio(int period)
Parameters
periodintThe period of the ROCR
RateOfChangeRatio(string, int)
Initializes a new instance of the RateOfChangeRatio class using the specified name and period.
public RateOfChangeRatio(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