Loading…

Relative Momentum Index

Ordinary RSI is built from the one-bar close-to-close change on every bar. That makes it sensitive to single-bar noise: one sharp bar against the prevailing move can flip a bar's contribution from "up" to "down" even in the middle of a clean trend, which is part of why RSI can churn in and out of overbought/oversold territory during a strong trend rather than holding there. The Relative Momentum Index changes exactly one thing in the RSI recipe: instead of comparing each close to the previous bar's close, it compares each close to the close InpMomentum bars back. Everything else - splitting the result into up/down components and smoothing them with Wilder's recursive average - is identical to standard RSI. With InpMomentum set to 1 this indicator is numerically standard RSI; raising it makes each contributing "move" span more bars, so a single sharp pullback bar no longer flips the whole window's sign the way it would in plain RSI, and the oscillator tends to hold in overbought/oversold zones longer during a genuine sustained trend. Notes and limitations - Needs InpMomentum + InpPeriod bars of history before it plots anything; on a freshly opened chart with thin history it stays blank until enough bars are available. - With InpMomentum above 1, the underlying momentum differences overlap across consecutive bars (each one reaches InpMomentum bars back), so the line is smoother and reacts more slowly to a sharp single-bar move than plain RSI at the same InpPeriod - this is the intended trade-off, not a defect. - Like standard RSI, overbought/oversold readings do not by themselves predict a reversal; in a strong trend the line can sit at an extreme for an extended stretch.

Indicator · MT4 · v1.0 · Free

About Relative Momentum Index

Relative Momentum Index is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Period, Momentum and Alerts. MQL source code included.

Files in the download: RelativeMomentumIndex.mq4, RelativeMomentumIndex.txt.

Settings

SettingDefaultWhat it does
Period14Wilder smoothing period applied to the up/down momentum sums
Momentum5Bars back each momentum difference is measured against (1 = plain RSI)
AlertstrueAlert once per closed bar crossing 30 or 70

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 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: RSI · Momentum · Trend · Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria