← Back to Home
Trading Signal / Indicator
📈

Rate of Change (ROC)

Measure price momentum as a percentage change over a defined lookback period.

Start Automating Free →

Want to automate this strategy? Try auto-Trading free — no credit card required.

Rate of Change (ROC) chart

Overview

What is Rate of Change (ROC)?

The Rate of Change (ROC) indicator measures the percentage change in price between the current period and a specified number of periods ago. It is one of the purest expressions of price momentum — directly answering the question: "How much has this asset moved in the last N periods?"

Formula: ROC = ((Current Close − Close N Periods Ago) ÷ Close N Periods Ago) × 100

ROC oscillates around zero. A positive ROC indicates prices are higher than N periods ago (upward momentum); a negative ROC indicates prices are lower (downward momentum). The magnitude indicates the speed of the move: a ROC of +20% means price is 20% higher than it was N periods ago, indicating strong momentum.

Common applications include: overbought/oversold signals (ROC reaching extreme positive values often precedes a pullback), divergence analysis (price making new highs while ROC makes lower highs signals weakening momentum), and zero-line crossovers as trend change signals.

ROC is mathematically equivalent to Momentum (price difference rather than percentage difference), and is closely related to the 12-period minus 26-period EMA difference that underlies MACD. For cross-asset momentum strategies, ROC is the preferred metric for ranking assets by their relative return over a standard lookback period.

How It Works in auto-Trading

Automate It

auto-Trading computes ROC for any period and price source. In the strategy builder, ROC can be used for: cross-asset momentum ranking (selecting the highest ROC assets for long positions), overbought/oversold threshold alerts, zero-line crossovers, and divergence detection. The multi-asset momentum scanner uses ROC to rank instruments and rebalance the portfolio toward the strongest-performing assets.

Try Free →

Strategy Code

Pick a script below, copy it, and use it on your chart.

Pine Script (TradingView)

This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.

//@version=6
strategy("Rate of Change (ROC)", overlay=true)
fastLen = input.int(20, "Fast Length")
slowLen = input.int(50, "Slow Length")
fast = ta.ema(close, fastLen)

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

ThinkScript (thinkorswim)

This is a thinkorswim ThinkScript example for this indicator. Open thinkorswim, create a custom study, paste the script, and apply it to your chart.

input length = 12;
def roc = RateOfChange(length = length);
def buySignal = roc crosses above 0;
def sellSignal = roc crosses below 0;
AddOrder(OrderType.BUY_AUTO, buySignal, close, 1, Color.GREEN, Color.GREEN, "ROC Buy");

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

Ready to automate Rate of Change (ROC)?

Join thousands of traders who use auto-Trading to execute this strategy automatically, 24/7.

Get Started Free →

All Strategies & Signals

Continue Learning

Trading Strategies

Trading Signals & Indicators