Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.01.26 11:21

Price Rate of Change (ROC) - indicator for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 20
roc.mq5 (2.69 KB)view


As you know, prices drop and grow in ondulatory way, in cycles. This cyclic movement is a result of change in investors' expectations and the price control fight between bulls and bears.

Price Rate of Change (ROC) reflects this ondulatory movement like an oscillator, measuring the difference in prices in a certain period. ROC grows if prices grow and drops along with them. The more the price change is, the more ROC changes.

12- and 25-day ROC are most widely spread. A 12-day ROC is a perfect short-term and medium-term indicator of overbought/oversold.

The higher ROC is, the more probable the rise. However, like in the case of using all other overbought/oversold indicators, you should not hurry to open a position until the market changes its direction (turns up or down). The market that seems to be outbidden can remain so for some time. In general, the state of utmost overbought/oversold usually assumes an extension of the current trend.


Price Rate of Change indicator

Price Rate of Change indicator


You can find the speed of price change as a difference between current closing price and the closing price n periods ago.

ROC = ((CLOSE (i) - CLOSE (i - n)) / CLOSE (i - n)) * 100


  • CLOSE (i) - closing price of the current bar;
  • CLOSE (i - n) - closing price n bars ago;
  • ROC - the value of Price Rate of Change indicator.

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.