Rate of Change (ROC)

Rate of Change, also known as Momentum Oscillator, is the percent change of price over a lookback window. Momentum is the raw price change equivalent. A Rate of Change with Bands variant, created by Vitali Apirine, is also available. [Discuss] :speech_balloon:

chart for Rate of Change (ROC)

// usage
IEnumerable<RocResult> results =

// usage with optional SMA of ROC (shown above)
IEnumerable<RocResult> results =
  quotes.GetRoc(lookbackPeriods, smaPeriods);


lookbackPeriods int - Number of periods (N) to go back. Must be greater than 0.

smaPeriods int - Optional. Number of periods in the moving average of ROC. Must be greater than 0, if specified.

Historical quotes requirements

You must have at least N+1 periods of quotes to cover the warmup periods.

quotes is a collection of generic TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.




Date DateTime - Date from evaluated TQuote

Momentum double - Raw change in price over N periods

Roc double - Percent change in price (%, not decimal)

RocSma double - Moving average (SMA) of ROC based on smaPeriods periods, if specified


See Utilities and helpers for more information.


This indicator may be generated from any chain-enabled indicator or method.

// example
var results = quotes

Results can be further processed on Roc with additional chain-enabled indicators.

// example
var results = quotes