Back to Guides
Guide

Rate of Change Indicator: Formula, Settings, Momentum

The rate of change indicator explained: the formula with every bracket, why MetaTrader does not list it, and what period sources actually name.

The rate of change indicator, usually shortened to ROC, measures how far price has travelled over a fixed number of bars and prints it as a percentage of the earlier price. It is a single line centred on zero: at zero the current price matches the price n bars back, above zero price is higher than it was, below zero it is lower.

The complication is the name. At least three formulas are published under it, one of them is what platforms call Momentum, and MetaTrader ships no Rate of Change at all. So settle which formula drew the line on your screen.

What is the Rate of Change indicator?

It is a momentum oscillator: it measures the speed of a price move rather than its direction or its level. You pick a lookback of n bars, and the indicator compares the current close with the close n bars ago.

That comparison uses two points and ignores everything between them, so a spike ten bars ago and a steady climb over ten bars can produce the same reading. The Secret Mindset's ROC page states the criticism: ROC "gives equal weight to the most recent price and the price from "n" periods ago".

The line is also unbounded. There is no ceiling and no floor, which matters for every threshold question.

What is the rate of change formula?

The zero-centred version, with every bracket:

ROC = ((P(i) - P(n)) / P(n)) x 100

P(i) is the current price and P(n) is the price n periods ago. Elearnmarkets writes the same thing with closes spelled out: "ROC = [(Close – Close n periods ago) / (Close n periods ago)] * 100".

A worked example in round numbers. The close ten bars ago was 100 and today's close is 110. The difference is 10, divided by 100 is 0.1, times 100 is a reading of 10 per cent. Tradingmetrics walks through the same two numbers, and Strike runs the same steps with 100 and 120 for a reading of 20 per cent.

LiteFinance prints its own main formula as:

ROC = ((P(i)-P(n)/P(n)) × 100%

LiteFinance prints that line twice, in its calculation section and again in its FAQ, where it adds "for today this formula is basic". As written, the missing bracket binds the division to P(n) alone, so P(n)/P(n) is 1 and the expression reduces to the current price minus 1, times 100. Copy it as printed and you get a line that tracks price itself.

Does ChartLabs have Rate of Change?

Yes, under that name. Open the chart's Indicators menu, go to the Standard list, and look under the Momentum & Oscillators heading. It opens in its own pane below price rather than drawing on the candles.

Ours is the zero-centred per cent version, so the line oscillates around 0 and a reading of 10 means price is 10 per cent above where it was. It has two settings. Length is 12 by default and sets how many bars back the current close is compared against. MA Length is 6 by default and draws a simple average of the ROC line beside it, so the pane carries two lines rather than one.

Is Rate of Change the same as Momentum?

Often yes, and that is where the confusion starts. LiteFinance lists three formulas under the ROC heading. The three in our own notation, with who its page credits each one to:

The formulaWhere the middle line sitsCredited to
ROC = P(i) - P(n)Zero, in price units rather than per cent"Stephen Akelisin in the book Technical analysis from A to Z"
ROC = P(i)/P(n) x 100%100John J. Murphy
ROC = ((P(i) - P(n)) / P(n)) x 100%Zero"new publications on technical analysis"

The third row is printed with a bracket missing, repaired here. The second row causes the trouble, and the page says so itself: "In modern trading, it is this formula that corresponds to the Momentum indicator, which introduces some confusion." It later prints Momentum as "Close(i)/Close(i-n) × 100%", which is the same expression.

Work the two against each other and they differ by a constant. P(i)/P(n) x 100 minus 100 is ((P(i) - P(n)) / P(n)) x 100. The ratio version and the per cent version are the same measurement with the axis moved by exactly 100, which is why a threshold borrowed from one means nothing on the other.

That gives you a test you can run in a second. LiteFinance: "If the median level is "100", this is Momentum, which is calculated using the second formula. If the median level is "0", this is the ROC, which is calculated by the third formula."

So look at where the middle of the scale sits on your own chart. A line oscillating around 0 is the per cent change version. A line oscillating around 100 is the ratio version, which most platforms call Momentum.

Why can't I find Rate of Change in MT4 or MT5?

Because it is not one of the built-in oscillators. MetaTrader 5's oscillator help page names fifteen, from Average True Range through Williams' Percent Range, and neither "Rate of Change" nor "ROC" is among them. Momentum is.

LiteFinance says the same thing from the other side: "For MT4/MT5 platforms, the Rate of Change is not a basic tool. It needs to be added through the data catalog." It then names the consequence: "The question is from what source it will be taken, namely, what calculation formula is used in it. Indicators with different formulas will give different signals and, accordingly, these will be fundamentally different trading systems."

MetaTrader's Momentum help page gives the formula as "MOMENTUM = CLOSE (i) / CLOSE (i - n) * 100" and describes it as "a ratio of today's price to the price n periods ago". That is the 100-centred version. If you went looking for ROC and settled for Momentum, your zero line is at 100.

Where you are plotting itWhat you get
MetaTrader 5No Rate of Change among the fifteen built-in oscillators. Momentum is built in, as CLOSE (i) / CLOSE (i - n) * 100. The help page names no default period and no levels.
A downloaded indicatorThe formula depends on whoever wrote it. Check where the middle line sits before you trust a rule written for it.
ChartLabsRate of Change is in the Indicators menu under Standard and opens in its own pane under price. The default period is 12, drawn with a 6-period average line. Momentum is there too, on the same settings.

Every one of those defaults can be changed in the indicator's own settings, so the period stays a decision rather than something handed to you.

Run the median-level test wherever you plot this. It will not tell our two entries apart, because our Momentum is the price-difference build rather than the ratio, so both lines sit around zero. It earns its keep on a downloaded indicator, or on a platform that ships the ratio version, where the middle sits at 100.

If you want to see the three versions behave differently, write them yourself in the built-in Pine Script editor. The editor uses Pine Script v5/v6 syntax, and the Pine Scripts tab has two Examples, "Example: Line on price" and "Example: Mark bars by a rule", each of which opens a copy in the editor to start from. Each indicator you add takes its own colour and style, so two versions of the same idea stay readable in one pane. There is no Pine backtesting: writing an indicator plots a line, it does not test a rule for you.

How do you read it?

Above zero, price is above where it was n bars ago. Below zero, it is lower. A cross of zero means the comparison has flipped. Steepening says the move is covering more ground per bar, flattening says it is covering less even while price is still rising.

Divergence is the other common reading: price makes a higher high while the line makes a lower one, which says the newest leg covered less ground than the last. None of that tells you what happens next, and the rules published for it arrive without any count of how often they worked.

What period should you use?

There is no agreed period, and MetaTrader documents none for Momentum.

Published numbers run from 5 to 200, and two different ones get called standard. Elearnmarkets says "In a standard calculation, the period is 12 days." StockGro calls 14 "This standard setting" for day trading, and on the same page names 9 for intraday scalping, 12 or 21 for swing trading on daily charts, 200 for long-term analysis and "up to 25 or more" on volatile assets. Tradingmetrics names "10, 14, or 20 days for short-term analysis". The Secret Mindset uses 5 on a daily chart for one method and 100 for another. None of them says where its number came from.

The nearest thing to a first-party figure is in MQL5's Momentum sample code, where the line reads "input int mom_period=14; // period of Momentum". That is a value in an example, not a documented default. Our own default is 12, which lands on one of the two numbers the sources call standard, and it is a starting point rather than a settled argument.

A shorter lookback reacts sooner and whips around more, a longer one smooths and lags, and the choice belongs to the timeframe you trade. Pick one, write it down, and keep it fixed while you are measuring anything. Change the period mid-test and you are no longer testing one thing.

Rate of Change vs RSI

The difference is the scale. RSI is bounded: it cannot leave 0 to 100, which is why fixed levels like 70 and 30 travel from one instrument to another. ROC has no bounds, so a threshold only means something next to that instrument's own history.

There is no standard overbought or oversold level for ROC, and Strike's page says so: "ROC does not have standard overbought or oversold levels." The numbers published for it anyway range from around ten per cent to five or seven times that, which is what you would expect when the scale depends on the instrument.

A level in per cent means something different on an instrument that typically moves 1 per cent a day and on one that moves 8 per cent. If you want a level, read it off the instrument and the period you are using, by looking at how far that line has historically travelled before turning, rather than borrowing a figure written for something else.

How do you use it in a strategy?

The patterns in print are the zero cross as a filter, divergence against price, and a moving average as a trend filter so that only one side is taken. The Secret Mindset's method puts those together: a 200-period exponential moving average decides direction, and divergences are taken only in that direction.

The number is usually missing. A rule like "enters the oversold area" is not testable until you name the level, and the rules that leave it unnamed leave you to find it yourself.

How would you test whether it does anything?

Fix the things the sources leave floating, then count.

  1. Fix the formula. Decide whether you are using the zero-centred version or the 100-centred one, write it down, and check that the line on your chart is the one you chose. Where the middle line sits tells you.
  2. Fix the period, one instrument, and one timeframe. One variable at a time or the result means nothing. If you leave the period at 12, say so; a default you did not choose is still a choice once you report a result.
  3. Define the signal in words a stranger could follow. "Crosses zero upward while price is above the 200 EMA" is testable. "Enters the oversold area" is not, until you name the number.
  4. Replay the chart bar by bar rather than scanning a finished one. Hindsight makes every divergence obvious. Stepping forward one bar at a time, with the right-hand side of the chart hidden, is the version of the test where you do not already know the answer. In ChartLabs the replay moves bar by bar, and historic trades snap to candle boundaries on the chart's timeframe. The timezone setting changes the times you see, not how the bars are grouped.
  5. Record every signal, not the memorable ones. Include the ones you would have skipped.
  6. Include costs. Commission and slippage are applied per symbol, so profit and loss reflects what trading actually costs. A momentum rule that fires often is the kind that looks fine until costs are in it.
  7. Count enough of them that the answer is not one good week.

Our beginner's guide to backtesting a strategy walks through that loop in general, and the forex backtesting guide covers the parts specific to currency pairs, including session behaviour and spread.

Try it on your own data

You can run that test on cleaned data from Dukascopy, bar by bar, with Rate of Change on the chart and your own version of it beside it. ChartLabs is a manual backtesting platform for forex, indices, commodities and crypto, with a 7-day free trial and no card required to start.

Start the free trial

Related Topics

rate-of-change-indicatormomentum-oscillatorindicator-formulabacktestingmetatrader