How Rmi is calculated

Learn the Rmi calculation formula inputs and limits.

Direct answer

RMI is calculated by transforming recent price movement into a momentum measure over a chosen lookback window, then applying a smoothing rule. The exact numeric output depends on (1) what “price” you use, (2) how you measure the change from one period to the next, (3) the length of the window, and (4) the smoothing method and how it handles edge cases (like zero change).

If you want to independently verify RMI, write down the indicator’s formula exactly as your platform defines it, then reproduce it using the same inputs (same timeframe, same price field, same window length, same smoothing). Because different vendors sometimes implement indicators with slightly different details, you should treat the implementation definition as part of the “calculation facts.”

Mechanism and definition

Most RMI-style calculations follow this general pattern:

  1. Choose a source price series You need a time series of prices, such as close-to-close values. A “source price” is the specific value per candle/bar (for example, the closing price of each bar). Different choices will produce different results even with the same lookback.

  2. Compute period-to-period change For each bar t, compute the change versus the previous bar:

  • change(t) = source(t) − source(t−1)
  1. Separate positive and negative movement Turn the change into two components:
  • gain(t) = max(change(t), 0)
  • loss(t) = max(−change(t), 0)

This step matters because momentum is often expressed as a ratio of averaged gains to averaged losses.

  1. Apply a lookback window Pick a window length N (for example, “14 periods” in many momentum indicators). Over that window, you compute aggregated gain and loss information. Conceptually, you average the gains and losses over the last N bars.

  2. Form a ratio from gains and losses A common structure is a ratio (sometimes called a relative strength measure):

  • ratio = average(gain over N) / average(loss over N)

Depending on the implementation, the ratio can be mapped into a bounded scale (often similar to oscillator-style indicators), using a function such as:

  • RMI = 100 − [100 / (1 + ratio)]

However, RMI implementations can vary in whether they use gain/loss, summed gain/loss, smoothed gain/loss, or alternative transformations. So the “formula” you use must match your exact RMI definition.

  1. Smooth the inputs or the ratio Many RMI-style indicators include an extra smoothing step (for example, an exponential or moving average smoothing of gain and loss). Smoothing reduces sensitivity to one-off spikes but adds lag.

Evidence or example (with explicit assumptions)

Because there is no single universal RMI definition across all platforms, the safest way to explain calculation is to show an example using a clearly stated, self-contained assumption set.

Assume the following for an example:

  • Source price = close
  • Time step = 1 bar
  • Change = close(t) − close(t−1)
  • gain(t) = max(change(t), 0)
  • loss(t) = max(−change(t), 0)
  • Lookback N = 3 (you can replace this with your chosen N)
  • Smoothing = none (simple averages)
  • Mapping to a 0–100 oscillator = 100 − 100 / (1 + ratio)

Now take a hypothetical series of closes (for bars 1 to 4):

  • close(0) = 100
  • close(1) = 102
  • close(2) = 101
  • close(3) = 105

Compute changes:

  • change(1) = 102 − 100 = +2 ⇒ gain(1)=2, loss(1)=0
  • change(2) = 101 − 102 = −1 ⇒ gain(2)=0, loss(2)=1
  • change(3) = 105 − 101 = +4 ⇒ gain(3)=4, loss(3)=0

With N = 3, the window for t=3 uses bars 1, 2, 3:

  • average gain = (2 + 0 + 4) / 3 = 2
  • average loss = (0 + 1 + 0) / 3 = 1/3

Ratio:

  • ratio = 2 / (1/3) = 6

Mapped value:

  • RMI = 100 − [100 / (1 + 6)]
  • RMI = 100 − [100 / 7]
  • RMI ≈ 85.71

What this example shows:

  • If losses are small relative to gains over the lookback, RMI becomes higher.
  • If gains and losses are balanced, RMI tends toward a middle value.
  • If average loss is zero, ratio is undefined or treated specially by implementations (see limitations).

Limitations, risks, and failure modes

1) Implementation differences

RMI is a name that may refer to different calculation variants. Even if two platforms both show an “RMI,” they might differ in:

  • source price choice
  • the exact lookback window definition
  • whether gain/loss are averaged or smoothed with a specific method
  • how they handle division by zero when loss averages are zero Because of this, you must verify the formula as implemented in your charting tool.

2) Edge cases and division-by-zero

If average(loss over N) equals zero, then ratio becomes infinite. Implementations typically handle this with a special case, such as returning a boundary value (for example, a top oscillator value) or setting ratio to a large number. If you reproduce the indicator manually, you must match the same edge-case rule.

3) Data alignment issues

RMI depends on consistent bar-to-bar alignment:

  • If you use different timeframes, RMI will differ.
  • If your data has missing bars or non-trading gaps, the “previous bar” reference changes.
  • If your indicator starts after insufficient history, early values may be undefined or computed with partial windows.

4) Interpretation is not prediction

Even if RMI is correctly calculated, its numeric level is not a guarantee of future direction. Historical relationships between momentum measures and future price can vary with market regime, volatility, and execution conditions. In other words: calculation accuracy does not imply predictive accuracy.

5) Costs, spreads, and execution are not in the formula

RMI’s calculation is based on price series inputs. It does not include trading costs, bid/ask spreads, slippage, or broker-specific execution effects. So any use of RMI must recognize that real outcomes can differ from what price-only indicators suggest.

Verification and next question

To independently verify “how RMI is calculated” for your exact setup:

  1. Identify your RMI formula definition from the charting tool (formula, smoothing type, parameters).
  2. Extract the same source price series used by the indicator.
  3. Recompute gain/loss and the ratio over the same window N.
  4. Apply the same mapping to the final scale (if your RMI is bounded).
  5. Match the tool’s edge-case behavior when losses (or gains) are zero and when there is insufficient history.

If you want, tell me the RMI formula name or the exact settings shown in your platform (especially the source price, window length N, and smoothing method).

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.