Skip to content
70% OFF Black Friday Sale Biggest Indicator Sale of the Year. 148 left Get Quantzee →
Back to Blog
Technical IndicatorsMomentumTrading Education

Relative Vigor Index: Close-Minus-Open Momentum and Its Lag

By Rajeev Gupta · · 16 min read

What the Relative Vigor Index measures (close vs open)

The relative vigor index (RVI) asks one narrow question: do bars tend to close above where they opened, or below? That's it. It doesn't look at the previous close, it doesn't count up-moves against down-moves the way RSI does, and it doesn't care where price sits inside a lookback range the way a stochastic does. It looks at the body of each candle, and it scales that body by the candle's full range.

The idea behind it is old and simple. In an uptrend, prices tend to close higher than they open. In a downtrend, the reverse. The RVI turns that tendency into a line that oscillates around zero. A reading above zero means recent bodies have leaned bullish. A reading below zero means they've leaned bearish. According to the MetaTrader 4 indicator documentation, the indicator is built to confirm the current trend by comparing the closing price with the opening price, and that is still the cleanest one-line summary.

Two features set it apart from the oscillators most traders already know.

  • It's body-based. The raw input is close minus open. Gaps between one bar's close and the next bar's open are ignored completely.
  • It's range-normalized. The body is divided by high minus low, so a 40-point body on a 40-point bar counts as full conviction, while the same 40 points on a 160-point bar counts as a quarter of that.

That second point is the part most tutorials skip, and it's why the RVI tends to sit in a tight band. A bar that closes at its high and opened at its low scores +1 on the raw ratio. A doji scores 0. A bar that closes at its low and opened at its high scores -1. Everything real falls between those walls, and after smoothing, the line rarely travels far from them.

This article is about reading that line properly: the exact arithmetic, what the smoothing does to timing, how it differs from RSI and the stochastic, and where the signals mislead. It's educational. Nothing here is a trade call, and an indicator reading is an input to your own rules, not a forecast.

The formula, step by step, with the 1-2-2-1 weighting

Most pages show the formula as a block of symbols and move on. Walking through it by hand is the fastest way to see where the lag comes from, so here is the full chain. The method below follows the standard definition used in the MetaTrader 4 reference and in the TradingView Pine implementation, with a default period of 10.

Step 1: the raw numerator and denominator

For each bar, compute two numbers:

Numerator   = Close - Open
Denominator = High  - Low

Take a hypothetical 1-hour bar that opened at 4,500.00, high 4,512.00, low 4,496.00, close 4,508.00. The numerator is 8.00. The denominator is 16.00. The raw ratio for that bar is 0.50. (These bar values are made up to show the arithmetic. They are not market data.)

Step 2: the 1-2-2-1 weighting

Instead of using the raw numerator and denominator directly, the RVI first smooths each one with a 4-bar symmetrically weighted moving average. The weights are 1, 2, 2, 1, summed and divided by 6:

SWMA(x) = (x[0] + 2*x[1] + 2*x[2] + x[3]) / 6

Num_s = SWMA(Close - Open) Den_s = SWMA(High - Low)

Why those weights? The two middle bars carry double weight, so the smoothing is centered on the gap between bar 1 and bar 2, not on the current bar. That has a direct cost. The center of mass of a 4-bar window with weights 1-2-2-1 sits 1.5 bars back from the current bar. So before anything else happens, the RVI is already describing the market as it was about one and a half bars ago.

Step 3: the period smoothing

Next, the weighted numerator and denominator are each summed (or averaged) over the user period, 10 bars by default, and divided:

RVI = SMA(Num_s, 10) / SMA(Den_s, 10)

A simple moving average over 10 bars has an average lag of (10 - 1) / 2 = 4.5 bars. Stack that on top of the 1.5-bar lag from the 1-2-2-1 step and the RVI line is centered roughly 6 bars behind the latest candle. This is plain arithmetic about window centers, not a measured result, and it holds for any input data.

Step 4: the signal line

The RVI gets a signal line, built by applying the same 1-2-2-1 weighting to the RVI itself:

Signal = SWMA(RVI) = (RVI[0] + 2*RVI[1] + 2*RVI[2] + RVI[3]) / 6

That adds another 1.5 bars of delay, so the signal line sits about 7.5 bars behind price. The "crossover" that every tutorial calls a trade trigger is the RVI line crossing a line that is, by construction, a delayed copy of itself. When the RVI turns, it crosses its signal a bar or two after the turn becomes visible in the RVI. By then the bars that caused the turn are already 6 or more candles old.

Here is the lag budget in one place, using window-center arithmetic:

StageWindowAdded delay (bars)Running total
1-2-2-1 weighting4 bars1.51.5
SMA over period10 bars4.56.0
Signal line (1-2-2-1 again)4 bars1.57.5

Set the period to 20 and the middle row becomes 9.5 bars, which pushes the signal line to about 12.5 bars behind. Set it to 5 and it falls to 2 bars, for a signal line near 5 bars behind. Nothing about the indicator is hidden here. It's just that nobody writes the arithmetic out.

A short worked example

Take four consecutive hypothetical bars, newest first, with a close-minus-open of +8, -2, +4 and +6, and a high-minus-low of 12, 8, 9 and 10. The weighted numerator is (8 + 2*(-2) + 2*4 + 6) / 6 = 18 / 6 = 3.0. The weighted denominator is (12 + 2*8 + 2*9 + 10) / 6 = 56 / 6, about 9.33. Those two series each get a 10-bar average, and the ratio of the averages is the RVI. One bullish bar after a run of mostly bullish bars nudges it a little. It never jumps. That "never jumps" quality is the whole character of the indicator.

If you want to confirm the construction against an independent implementation, the Pine Script walkthrough from Pineify shows the same four-bar weighting in code, and the MetaTrader 4 help page documents the same defaults.

Default settings on TradingView and what changing them does

The TradingView built-in uses a length of 10. The TradingView support article on the Relative Vigor Index describes the same two-line display, an RVI line and a signal line. There's only one meaningful input, the length, because the 1-2-2-1 weights are fixed in the definition. Everything below is about that one number.

Shorter length (5 to 7)

A shorter window cuts the lag, and the line starts to wiggle around zero more often. Crossovers multiply. On a noisy 5-minute chart you may see several crosses inside a single hour, most of them in the middle of a range, where the RVI is oscillating around 0 because bodies are small and alternate in sign. If you use short lengths, expect many of those crosses to be noise. The cure is not a smaller number, it's a rule that ignores crosses near the zero line.

The default (10)

Length 10 is the compromise most platforms ship. It's smooth enough to hold a shape through a normal pullback and fast enough that a real trend change shows up within a handful of bars. It's also an arbitrary choice. Nothing about 10 is special for any instrument or timeframe, and treating the default as tuned for your market is a common mistake.

Longer length (20 to 30)

Longer windows push the line toward a slow trend gauge. You get fewer crosses and a calmer line, and the lag climbs to roughly 10 to 15 bars on the signal line. That's usable if you read the RVI as a regime filter, positive or negative, instead of as an entry trigger. It's close to useless as a timing tool.

What changing the timeframe does

The RVI is defined in bars, not minutes. A 10-bar RVI on a daily chart describes about two trading weeks. A 10-bar RVI on a 5-minute chart describes under an hour. Same formula, different question. If you compare an RVI reading from one chart against a screenshot someone posted from another, check the timeframe first.

It also matters that the denominator uses the bar's own range. In a quiet stretch, a small body can still produce a large ratio because the range is also small. In a volatile stretch, the same absolute body produces a small ratio. The RVI is measuring body share of range, not absolute price movement, so it can read "strong" during dull trading and "weak" during a big swing with long wicks.

RVI vs RSI vs Stochastic: three different questions

People file all three under "oscillator" and then wonder why they disagree. They disagree because they answer different questions.

RSI asks: how much of recent movement was up?

RSI compares the average of up-closes against the average of down-closes over a window, usually 14 bars, and rescales to 0-100. It uses close-to-close changes. A gap up on the open registers as a gain even if the bar itself closes below its open. The glossary entry on RSI (Relative Strength Index) covers the construction and the usual overbought and oversold framing.

The stochastic asks: where is the close inside the recent range?

A stochastic compares the latest close against the highest high and lowest low of a lookback window. It's a position-in-range measure and it saturates at 0 and 100 whenever price pins to an extreme. We walk through that comparison, including where the two fail differently, in stochastic oscillator vs RSI.

RVI asks: do the candle bodies lean up or down?

The RVI ignores gaps, ignores the lookback high and low, and works from body-to-range share. If you picture RSI as counting distance traveled, and the stochastic as measuring position on a ruler, the RVI is closer to a smoothed vote on candle color, weighted by how much of the bar the body filled.

There's a useful way to see why it behaves like a stochastic of body size. The denominator (high minus low) plays the same role as the stochastic's range, and the numerator (close minus open) plays the role of the position. Instead of "where did the close land in the 14-bar range," the RVI asks "how far did this bar travel from its own open, as a share of its own range." Same normalizing move, much shorter reference window.

IndicatorRaw inputTypical rangeTypical defaultSaturates?
RSIClose-to-close changes0 to 10014 barsPins above 70 / below 30 in strong trends
StochasticClose vs lookback high/low0 to 10014 barsPins at 0 or 100 in strong trends
RVIClose-minus-open over high-minus-lowRoughly -1 to +1, usually much narrower10 barsRarely; stays in a tight band

Because the RVI doesn't saturate in the same way, the habit of reading "overbought" and "oversold" off it doesn't transfer. There's no fixed 70 or 30. Readers who bolt the RSI playbook onto the RVI usually end up with a line that never reaches their thresholds. Anchor to zero and to the signal line, and treat levels as relative to that instrument's own recent history.

It's also worth saying what the RVI doesn't tell you. It doesn't measure volume. It doesn't know whether a rally is happening on thin or heavy participation. It doesn't know what the higher timeframe is doing. A body-to-range ratio is a thin slice of information, and the smoothing makes it thinner.

Signal line crosses and divergence: when they mislead

The signal-line cross is the headline use case on nearly every page that ranks for this indicator. A cross of the RVI above its signal is read as bullish momentum, and below as bearish. The mechanics are straightforward. The reliability is the question, and the lag budget above is the starting point for answering it.

The cross is late by construction

Remember that the signal is a 1-2-2-1 average of the RVI. For the RVI to cross above its signal, the RVI has to be rising faster than its own recent average. That happens after the RVI has already turned. In practice you're acting on information from several bars back. In a fast reversal, the cross often prints after the bulk of the move.

Crosses cluster in ranges

When price chops sideways, the RVI hovers near zero, flips sign often, and crosses its signal repeatedly. The indicator is working as designed. Bodies are small and alternate in color, so the weighted average stays near zero. Every cross is technically valid and almost none carries information. A rule such as "ignore crosses while the RVI is within a narrow band around zero" removes a large share of these, though how narrow is something you have to calibrate on your own instrument and timeframe, not borrow from a blog post.

Crosses in strong trends can come early

In a steady trend, a pullback of two or three bars can drag the RVI below its signal while price stays well within the trend. The cross prints, you read it as a reversal, and the next bars resume the trend. This is the mirror image of the range problem. The RVI correctly reports that recent bodies shrank or flipped. It cannot report that the trend remained intact.

Divergence is a pattern, not a prediction

Divergence means price makes a new high while the RVI makes a lower high, or the reverse at lows. It's a popular read, and it has three problems worth stating plainly.

  • It's subjective. Which peaks do you compare? Different traders draw different lines on the same chart.
  • It's retrospective. A divergence is only visible after the second peak has printed and the oscillator has turned down from it. Pivot-based detection needs a few bars of confirmation, which adds delay.
  • It can persist. A divergence can sit on a chart through a long continuation. Weaker momentum is not the same as a turn.

The LuxAlgo library entry on the RVI and its piece on judging bull/bear balance both cover the formula and the crossover, and both are fair introductions. What neither works through is the lag arithmetic above, which is the reason we wrote this article.

Repainting: does the RVI repaint?

On closed bars, no. The RVI uses only the open, high, low and close of completed bars plus fixed-weight averages, so a value on a closed bar doesn't change later. On the live, still-forming bar, the values update tick by tick because the current bar's close, high and low keep moving. If a script plots or alerts on the live bar, a cross can appear and then disappear before the bar closes. That's a behavior of the unclosed bar, not a rewrite of history. If you want signals that never vanish, evaluate on bar close. We cover the broader definition in non-repainting TradingView indicators.

Using RVI with a trend filter

Given the above, the case for raw crosses is thin and the case for using the RVI as a confirming input is better. The practical move is to separate two jobs: something else decides the direction you're willing to take, and the RVI only times entries inside that direction.

A simple structure

  1. Pick a trend definition first. It can be a moving average slope, a higher-timeframe structure rule, or the position of price against a long-period average. Whatever it is, write it down before you open the RVI.
  2. Only take RVI crosses that agree with it. In an up-trend, ignore bearish crosses entirely. In a down-trend, ignore bullish ones. This removes roughly half of the crosses by rule, and it removes the half that causes the worst whipsaws.
  3. Require the RVI to be on the right side of zero, or at least rising from below it. A bullish cross while the RVI is deeply negative is just a bounce inside a bearish regime.
  4. Act on closed bars only. Wait for the bar to finish. It costs you one bar and saves you every cross that disappears.

Read the RVI as a regime, not a trigger

One use that survives the lag problem is a sign check. Is the smoothed RVI above zero or below? That's a slow answer to "are candle bodies leaning bullish over the last couple of weeks (on a daily chart) or the last couple of hours (on a 5-minute chart)." Because it's slow, it doesn't need to be fast. It is a context signal, comparable in role to a moving-average slope.

Test before you trust it

Whatever combination you pick, test it on your own instrument and timeframe, including costs, before relying on it. Our methodology rule on this site is to publish a number only when a saved run produced it, so this article gives you no hit rate for the RVI, and any article that does without showing the dataset, sample of trades, test setup and cost assumptions is giving you a story. The U.S. Securities and Exchange Commission's investor education site, Investor.gov, and FINRA's investor resources at finra.org both stress that past performance doesn't guarantee future results, and that applies to every indicator rule you will ever backtest.

Where the lag matters least, and most

Slow, swing-style timeframes tolerate the RVI's lag better, because a 7-bar delay on a daily chart is a week and a trend that lasts months absorbs it. Fast scalping timeframes tolerate it worst, because 7 bars on a 1-minute chart is seven minutes and the move you wanted may be done. If you trade fast, either shorten the length and accept the noise, or use the RVI only as a regime filter and take timing from something faster.

Pairing it with momentum and mean-reversion tools

The RVI belongs to the family of momentum measures, and it pairs reasonably with a trend-following frame. The glossary page on momentum trading lays out that frame. If your approach leans toward fading extremes, the RVI is a poor fit, because it has no extremes to fade. Use a bounded oscillator for that job and let the RVI answer the body-bias question separately.

That's the design thinking behind the Adaptive AI Oscillation Engine from Quantzee, which combines a Quant Wave momentum reading, Flow Pressure, an Agreement Gauge and confirmed divergences in one view, so you aren't hand-stacking several oscillators and reconciling their disagreements by eye. It's a TradingView indicator, sold as analytical software with a one-time $59.99 (Rs 4,999) lifetime price and no free tier. It doesn't replace your own rules, and it isn't advice. If you want to see how it reads next to the RVI on your own charts, run both side by side on a paper-trade basis first.

A checklist you can copy

If you'd rather skip the prose, here's the short version of everything above.

  • RVI = SMA(SWMA(close - open), n) / SMA(SWMA(high - low), n), with n = 10 by default.
  • Signal = SWMA(RVI). Total lag to the signal line at n = 10 is about 7.5 bars, by window-center arithmetic.
  • It reads body bias, not distance or range position, so RSI and stochastic thresholds don't apply.
  • Crosses near zero are mostly noise. Crosses against the higher-level trend are whipsaws.
  • Closed-bar values don't repaint. Live-bar values move until the bar closes.
  • Decide direction with a separate trend rule, then use the RVI to time entries inside it.
  • Test your own version, with costs, on your own market. Don't borrow a hit rate from anyone.

Frequently Asked Questions

What is the Relative Vigor Index?
The Relative Vigor Index is a momentum oscillator that compares where a bar closes against where it opened, scaled by the bar's high-to-low range and smoothed with a 1-2-2-1 weighted average and a 10-bar period by default. A reading above zero means recent candle bodies have leaned bullish, and below zero means they've leaned bearish. It comes with a signal line used for crossovers.
What are the best RVI settings?
There's no single setting that suits every market. The default length is 10, a shorter length such as 5 to 7 reduces lag but adds more false crosses, and a longer length such as 20 to 30 gives a calmer line that works better as a regime filter than as an entry trigger. Pick a length, then test it on your own instrument and timeframe with costs included.
Is RVI a leading or lagging indicator?
It's lagging. With a 10-bar period, the 1-2-2-1 weighting adds about 1.5 bars of delay, the 10-bar average adds about 4.5, and the signal line adds another 1.5, so the signal line sits roughly 7.5 bars behind price. That is window arithmetic, and it is why crossovers tend to confirm a move rather than anticipate it.
How is RVI different from RSI?
RSI measures the balance of up-closes and down-closes between bars over a window, usually 14, on a 0 to 100 scale. The RVI measures the share of each bar's range covered by its own body, ignoring gaps, and oscillates around zero. RSI has widely used overbought and oversold zones. The RVI doesn't have fixed levels like that.
Does the Relative Vigor Index repaint?
Not on closed bars. The calculation uses completed open, high, low and close values with fixed weights, so a closed-bar reading doesn't change later. The still-forming bar updates as price moves, so a crossover can appear and vanish before the bar closes. Evaluating on bar close avoids that.

Quantzee provides analytical software and educational content only. Nothing here is investment advice or a recommendation to buy or sell any instrument, and trading carries the risk of loss.

FAQ

Frequently Asked Questions

The Relative Vigor Index is a momentum oscillator that compares where a bar closes against where it opened, scaled by the bar's high-to-low range and smoothed with a 1-2-2-1 weighted average and a 10-bar period by default. A reading above zero means recent candle bodies have leaned bullish, and below zero means they've leaned bearish. It comes with a signal line used for crossovers.

Put It Into Practice

Try Quantzee's AI-Powered Indicators

Non-repainting signals, real-time alerts, all markets.

Get Quantzee
Rajeev Gupta, Founder & CEO of Quantzee

Written By

Rajeev Gupta

Founder & CEO, Quantzee

Rajeev Gupta is a Commerce Graduate with a Masters in Business Administration (Finance), and has been trading the markets since 1997. He previously worked with Religare Securities Limited as Head – Private Client Group until 2006, after which he started his own broking firm. He went on to found and lead Quantzee, where his focus has stayed on quantitative trading strategies — volatility dynamics, intraday price behavior, and regime-aware signal design. Every indicator in the Quantzee suite is derived from the methodology he uses in his own live trading account.