Skip to content

ROCR

Summary

Rate of Change Ratio: the ratio of the current price to the price optInTimePeriod bars ago. A momentum measure centered at 1. Always positive, centered at 1: >1 rising, <1 falling.

Formula

ROCR = price / price[t - optInTimePeriod]

Inputs

  • inReal — Price series

Outputs

  • outReal — Ratio of current price to prior price

Parameters

  • optInTimePeriod — Lookback distance in bars for the prior price

Implementation

TA-Lib Definition: rocr.c · rocr.yaml

Native File
C ta_ROCR.c
Rust rocr.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Rate of Change Ratio

See Also

ROC · ROCP · ROCR100 · MOM