◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Relative Vigor Index (RVI)
Momentum indicator

Relative Vigor Index (RVI)

An oscillator comparing where bars close within their range, smoothed with symmetric weighting — not to be confused with the Relative Volatility Index.

Illustrative diagram — not live market data.

What it is

The Relative Vigor Index (RVI), popularized by John Ehlers in a 2002 Technical Analysis of Stocks & Commodities article, is built on a simple observation: in periods of upward pressure, bars tend to close above their open, and in downward pressure, below it. RVI measures this by comparing the close-minus-open difference to the high-minus-low range, both smoothed, producing an oscillator around zero with a companion signal line. One disambiguation matters and is routinely skipped: RVI shares its acronym with Donald Dorsey's Relative Volatility Index (1993), a completely different indicator that applies RSI-style math to standard deviation instead of price change. MetaTrader's built-in 'RVI' is the Relative Vigor Index described here; charting platforms and articles frequently conflate the two, so always check which formula is behind the label before comparing values. Like every oscillator, RVI describes recent price behavior — where closes sat within their bars — and predicts nothing about future price. This entry is educational material, not financial advice, and all trading carries risk of loss.

How it works

Each bar contributes two raw quantities: the numerator input (close − open) and the denominator input (high − low). Both are first smoothed with a symmetric 4-bar weighted average using weights 1, 2, 2, 1 (divided by 6) — in Pine this is exactly ta.swma. The smoothed numerators and denominators are then each summed over the lookback period (10 by default), and RVI is the ratio: total smoothed close-open displacement divided by total smoothed range. When closes cluster near the highs of their bars, the ratio is positive and rising; when closes sit near the lows, it turns negative. A signal line is produced by applying the same symmetric 1-2-2-1 weighting to the RVI line itself. Two structural details are worth knowing. First, the symmetric weighting is a smoothing filter, and smoothing means lag — the four-bar window centers its weight roughly 1.5 bars in the past, and the summation adds more. Second, because the denominator is the traded range, RVI is naturally normalized: a wide-range bar and a narrow-range bar with the same close-to-open proportion contribute similarly, which distinguishes RVI from raw momentum measures that scale with volatility.

How traders read it

Common settings

Length 10 is the standard default for the summation window, with the signal line fixed as a 4-bar symmetric (1-2-2-1) weighted average of the RVI line. Shorter lengths make both lines more reactive and the crossings more frequent; longer lengths smooth the picture at the cost of additional lag. MetaTrader's built-in RVI uses the same construction. There are no standard overbought/oversold bands, since the oscillator is unbounded.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("RVI Example", overlay = false)

length = input.int(10, "Length", minval = 1)

// Symmetric 1-2-2-1 weighting (ta.swma), then summed over the window
num = math.sum(ta.swma(close - open), length)
den = math.sum(ta.swma(high - low), length)

rvi = den == 0 ? 0.0 : num / den
sig = ta.swma(rvi)

crossUp   = ta.crossover(rvi, sig) and barstate.isconfirmed
crossDown = ta.crossunder(rvi, sig) and barstate.isconfirmed

plot(rvi, "RVI",    color = color.blue)
plot(sig, "Signal", color = color.orange)
hline(0, "Zero", color = color.gray)

alertcondition(crossUp,   "RVI above signal", "RVI crossed above its signal line on a confirmed bar")
alertcondition(crossDown, "RVI below signal", "RVI crossed below its signal line on a confirmed bar")

Pro tip: Before using anything labeled 'RVI', verify the formula: if it oscillates around zero and is built from close-minus-open over high-minus-low, it is the Relative Vigor Index; if it lives on a 0–100 scale built from standard deviation, it is Dorsey's Relative Volatility Index. The two answer different questions, and settings or interpretations do not transfer between them. As always, read the oscillator as context alongside price structure — this is educational content only, no indicator is predictive, and trading carries risk of loss.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro