.netCHARTING v10.5 Documentation


dotnetCHARTING Namespace > FinancialEngine Class > RateOfChange Method : RateOfChange(Series,Int32) Method
An series where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
The number of days before to which the closing price is compared.
RateOfChange(Series,Int32) Method
Calculate the n-day rate of change (ROC) for all periods for which there is sufficient data.
Syntax
'Declaration
 
Public Overloads Shared Function RateOfChange( _
   ByVal s As Series, _
   ByVal numberDays As Integer _
) As Series
'Usage
 
Dim s As Series
Dim numberDays As Integer
Dim value As Series
 
value = FinancialEngine.RateOfChange(s, numberDays)
public static Series RateOfChange( 
   Series s,
   int numberDays
)

Parameters

s
An series where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
numberDays
The number of days before to which the closing price is compared.

Return Value

A series where the first term is the rate of change for the most recent period, the second term is the rate of change for the previous period and so on.
Exceptions
ExceptionDescription
Thrown if either parameter is strictly negative.
Remarks
The (n-day) rate of change (ROC) is just the last closing price divided by the closing price n-days ago.

As with the case with the momentum indicator the rate of change (ROC) indicator on extended values and/or turning points indicates oversold or over brought conditions (respectively).

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also