Loading…

Rate Of Change Comparator

A single rate-of-change line answers one question - is price higher or lower than N bars ago - but says nothing about whether short-term momentum agrees with the longer-term trend behind it. Plotting a fast and a slow ROC on the same scale answers that directly: when the fast line is above the slow one, momentum is accelerating relative to the longer baseline; when it crosses below, short-term momentum is fading before the longer measure has turned. That crossover typically shows up before either line's own zero-line cross, which is the reason to look at two speeds together rather than one at a time. Each line is computed the standard way, RocN = (price - price N bars ago) / price N bars ago * 100, entirely independently of the other and of its own previous value, so neither line can repaint once its bar closes. Notes and limitations - Needs InpSlowPeriod bars of history before the first value appears; earlier bars are intentionally left empty rather than guessed. - Both lines are unbounded percentage measures, not oscillators fixed to a scale - compare their current swing to their own recent history rather than to a fixed range. - Recomputed independently at every bar from raw price only, so neither line depends on its own previous value and neither can repaint. - A crossover is a momentum signal, not a trade signal on its own; it says nothing about the underlying trend direction, which this indicator does not attempt to measure.

Indicator · MT5 · v1.0 · Free

About Rate Of Change Comparator

Rate Of Change Comparator is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Fast period, Slow period and Applied price. MQL source code included.

Files in the download: RocComparator.ex5, RocComparator.mq5, RocComparator.txt.

Settings

SettingDefaultWhat it does
Fast period9Fast ROC period, in bars
Slow period25Slow ROC period, in bars
Applied pricePRICE_CLOSEApplied price
AlertstrueAlert once per closed bar on fast/slow crossover

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Momentum · Trend · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria