Table of Contents

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

period int

The 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

name string

The name of this indicator

period int

The period of the ROCR

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

timeWindow IReadOnlyWindow<long>
window IReadOnlyWindow<DoubleArray>

The window of data held in this indicator

time long
input DoubleArray

The input value to this indicator on this time step

Returns

DoubleArray

A new value for this indicator