Skip to main content

ROC

Type: roc • Category: indicators

Description

Rate of Change

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringprices datano
pricestringPrice field to use to calculate ROCno
timeperiodnumberNumber of periods to use for ROC calculationno10

Help

ROC (Rate of Change)

Description

The Rate of Change (ROC) indicator is a momentum indicator used in financial analysis to measure the percentage change in price over a specified period of time. It helps traders and analysts identify the speed and direction of price movements.

What does this worker do?

The ROC worker calculates the Rate of Change for a given set of price data over a specified time period. It takes the following parameters:

  • dataExp: prices data
  • price: Price field to use to calculate ROC
  • timeperiod: Number of periods to use for ROC calculation

The worker then returns the calculated ROC values, which can be used to analyze the momentum of the price movements.

How to interpret the results?

The ROC indicator can be interpreted in the following ways:

  • A positive ROC indicates an upward price movement, while a negative ROC indicates a downward price movement.
  • A high ROC value indicates a rapid price movement, while a low ROC value indicates a slow price movement.
  • When the ROC crosses above the zero line, it is considered a bullish signal, indicating a potential buying opportunity. Conversely, when the ROC crosses below the zero line, it is considered a bearish signal, indicating a potential selling opportunity.

Usage

To use the ROC worker, simply provide the required parameters:

  • dataExp: Your price data
  • price: The price field you want to use for the calculation (e.g. "close")
  • timeperiod: The number of periods you want to use for the calculation (e.g. 14)

For example:

ROC(dataExp=[10, 12, 15, 18, 20], price="close", timeperiod=3)

Visualizing the ROC Indicator

Here is an example of how to use the ROC indicator:

Full GIF

And here is a shorter version:

Short GIF

Additional Knowledge

The ROC indicator was first introduced by J. Welles Wilder in his book "New Concepts in Technical Trading Systems". It is often used in combination with other indicators, such as the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD), to provide a more comprehensive view of market trends.

By using the ROC indicator, traders and analysts can gain insights into the momentum of price movements and make more informed investment decisions.