Watch a stock for a few weeks and one small habit starts to stand out. On good days it opens, wobbles, and then finishes near the top of the day’s range. On bad days it opens fine and slides into the close. The relative vigor index (RVI) is built on exactly that habit. It doesn’t care much where the price went in absolute terms. It asks a narrower question: on each bar, how far did the close travel from the open, compared with how wide the whole bar was?
That makes it a conviction gauge. A stock can drift up on thin, half-hearted sessions, or it can rise on bars that open low and close strong day after day. Both moves look like an uptrend on a line chart. The RVI tries to tell them apart.
In this guide we’ll go through the logic, the formula as MetaTrader 5, Investopedia and TradingView describe it, a full worked example on hypothetical prices, and the ways traders actually use the indicator. If you want the broader toolkit first, our technical analysis guide for Indian stocks lays out where oscillators fit.
In this article
What the relative vigor index is really measuring
The idea is stated plainly in the MetaTrader 5 help page on the RVI: in a bull market the closing price is, as a rule, higher than the opening price, and in a bear market it’s the other way round. So the “vigor” of a move is judged by where prices end up at the close.
On its own, close minus open is a raw rupee number, and that’s a problem. A ₹6 gap between open and close means a lot on a ₹100 stock and very little on a ₹3,000 one. It also means different things on a calm day and a wild one. So the RVI divides by the bar’s range, high minus low. The simplest version, as MetaTrader 5 writes it, is:
RVI = (Close − Open) / (High − Low)
A reading near +1 means the bar opened at its low and closed at its high. A reading near −1 means the reverse. Zero means the close landed back where the open was, however far price roamed in between.
That single-bar ratio is too jumpy to trade off, so the published indicator smooths it twice. Once inside each bar’s calculation, and again when it builds a signal line.
The RVI doesn’t ask how far a stock moved. It asks how much of each bar’s range the buyers or sellers actually kept by the close.
The RVI formula, piece by piece
Both Investopedia and TradingView lay out the same building blocks. For the current bar and the three bars before it, define:
- a, b, c, d: close minus open for the current bar, one bar back, two bars back and three bars back.
- e, f, g, h: high minus low for those same four bars.
Then the four bars are blended with weights of 1, 2, 2 and 1, so the middle two count double:
- Numerator = (a + 2b + 2c + d) / 6
- Denominator = (e + 2f + 2g + h) / 6
MetaTrader 5 calls this a 4-period symmetrically weighted moving average. The divide-by-6 is just the sum of the weights.
Next, take a simple moving average of the numerator over N periods and a simple moving average of the denominator over the same N periods, and divide one by the other:
RVI = SMA(Numerator, N) / SMA(Denominator, N)
Because both averages use the same N, the divisions by N cancel out. In practice you can just add up the last N numerators, add up the last N denominators, and divide. MetaTrader 5 says 10 is considered the best period, so N = 10 is the common default on most platforms.
Finally, the signal line applies the same 1-2-2-1 weighting to the RVI itself:
Signal = (RVI + 2 × RVI one bar ago + 2 × RVI two bars ago + RVI three bars ago) / 6
So you end up with two lines that hover around zero. The RVI line is the faster one; the signal line trails it slightly.
Why it isn’t the same as the stochastic
MetaTrader 5 and Investopedia both point out that the RVI is calculated much like the stochastic oscillator. The difference is the anchor. The stochastic compares the close with the low of the lookback range. The RVI compares the close with the open of each bar.
That sounds like a small change, but it shifts what the indicator listens to. A stock that gaps up and then sells off all day can still close well above the period’s low, so a stochastic might look healthy. The RVI would mark that session as weak, because the close finished below the open. If you’ve used the stochastic RSI, think of the RVI as its cousin that cares about intraday follow-through rather than position in a range.
Investopedia also describes the RVI as a centered oscillator rather than a banded one. It moves around a zero line instead of between fixed levels like 0 and 100. There’s no built-in “overbought at 80” rule here, which is something to keep in mind before borrowing habits from RSI.
A worked example on hypothetical prices
Let’s run the numbers on a made-up stock. These are not real prices for any listed company; they’re chosen so the arithmetic is easy to follow. To keep the table short, we’ll use N = 4 instead of the usual 10. The mechanics are identical, you’d just add up more rows.
| Bar | Open | High | Low | Close | Close − Open | High − Low |
|---|---|---|---|---|---|---|
| 1 | 500 | 508 | 497 | 506 | 6 | 11 |
| 2 | 506 | 513 | 503 | 511 | 5 | 10 |
| 3 | 511 | 516 | 507 | 514 | 3 | 9 |
| 4 | 514 | 520 | 511 | 518 | 4 | 9 |
| 5 | 518 | 522 | 512 | 515 | −3 | 10 |
| 6 | 515 | 519 | 509 | 511 | −4 | 10 |
| 7 | 511 | 515 | 505 | 507 | −4 | 10 |
| 8 | 507 | 512 | 503 | 510 | 3 | 9 |
| 9 | 510 | 517 | 508 | 516 | 6 | 9 |
| 10 | 516 | 524 | 514 | 523 | 7 | 10 |
| 11 | 523 | 531 | 521 | 529 | 6 | 10 |
Step 1: the weighted numerator and denominator
The first bar with three bars behind it is bar 4. There, a = 4 (bar 4), b = 3 (bar 3), c = 5 (bar 2) and d = 6 (bar 1).
Numerator = (4 + 2×3 + 2×5 + 6) / 6 = 26 / 6 = 4.333
For the ranges, e = 9, f = 9, g = 10 and h = 11.
Denominator = (9 + 2×9 + 2×10 + 11) / 6 = 58 / 6 = 9.667
Repeat that for every bar from 4 onwards and you get:
| Bar | Numerator | Denominator | RVI (N = 4) | Signal |
|---|---|---|---|---|
| 4 | 4.333 | 9.667 | – | – |
| 5 | 2.667 | 9.333 | – | – |
| 6 | 0.167 | 9.500 | – | – |
| 7 | −2.333 | 9.833 | 0.126 | – |
| 8 | −2.667 | 9.833 | −0.056 | – |
| 9 | 0.000 | 9.500 | −0.125 | – |
| 10 | 3.500 | 9.333 | −0.039 | −0.046 |
| 11 | 5.833 | 9.500 | 0.175 | −0.035 |
Step 2: the RVI line
Bar 7 is the first point with four numerators available (bars 4 to 7). Add them: 4.333 + 2.667 + 0.167 − 2.333 = 4.833. Add the four denominators: 9.667 + 9.333 + 9.500 + 9.833 = 38.333. Divide, and the RVI at bar 7 is 4.833 / 38.333 = 0.126.
Notice what’s happened. Bars 5, 6 and 7 all closed below their opens, but the RVI is still slightly positive at bar 7. That’s the smoothing at work. The strong closes of bars 1 to 4 are still sitting inside the window and propping it up.
By bar 9 those early bars have rolled out, and the RVI drops to −0.125. The three red sessions have finally shown up in the reading.
Step 3: the signal line
The signal line needs four RVI values, so bar 10 is the first one we can compute:
Signal = (−0.039 + 2×(−0.125) + 2×(−0.056) + 0.126) / 6 = −0.275 / 6 = −0.046
At bar 11 the RVI jumps to 0.175 while the signal line only edges up to −0.035. The RVI is now clearly above its signal line and back above zero. Look at the raw bars and it makes sense: bars 9, 10 and 11 each closed near their highs, with closes 6, 7 and 6 points above their opens on ranges of 9 to 10 points.
The pullback in this example showed up on the chart at bar 5, but in the RVI only around bar 8. The smoothing that removes noise also costs you time.
How traders read the RVI
TradingView and Investopedia both name the same two signals as the most common uses.
Crossovers
When the RVI line crosses above its signal line, it’s read as bullish; when it crosses below, it’s read as bearish. That’s the RVI’s version of a moving-average crossover, and like every crossover, it fires a lot in sideways markets. On a choppy daily chart of a range-bound stock you could get several crosses in a fortnight, most of them meaningless.
One habit that helps: only take crossovers in the direction of the bigger trend. If the stock is above a rising 50-day moving average, pay attention to bullish crosses and treat the bearish ones as noise, and vice versa.
Divergences
A divergence is when price and the RVI disagree. Say a stock makes a new high, but the RVI makes a lower high than it did on the previous peak. Price went further, yet the bars that got it there closed with less conviction. TradingView describes that kind of divergence as a hint of a near-term trend change.
We’d treat that as a warning, not a sell signal. Divergences can run for weeks before price does anything about them. They’re most useful when they line up with something on the price chart itself, like a broken trendline or a failed retest of support.
Position around zero
Because it’s centered, the side of zero the RVI sits on tells you something too. Above zero, the recent bars have, on balance, closed above their opens relative to their ranges. Below zero, the opposite. Investopedia notes that the RVI tends to work best in trending markets, and the zero line is a simple filter for which way that trend is leaning.
Where the RVI falls short
A few honest limitations before you put it on a chart.
- Gaps are invisible to it. The RVI only looks at open-to-close within each bar. If a stock gaps up 4% on results and then closes slightly below that higher open, the RVI reads it as a weak bar. The overnight move, which might be the biggest thing that happened all week, doesn’t count. For Indian stocks that react to results, block deals or global cues before the market opens, that’s a real blind spot.
- It lags. Our worked example showed the delay: three down bars before the RVI turned negative. With N = 10 instead of 4, the delay is longer.
- Doji-heavy stretches confuse it. In tight, indecisive markets where closes land near opens, the RVI hovers around zero and the two lines cross back and forth.
- Thin stocks distort the range. One stray trade at an odd price can stretch a bar’s high or low on an illiquid small-cap, which inflates the denominator and mutes the reading.
None of these make the indicator useless. They just mean the RVI works best as a second opinion on liquid stocks and indices, not as a standalone system.
Putting it together on a chart
Here’s a practical way to set it up. Start with the default N = 10 that most platforms use. Plot the RVI below the price chart. Then decide in advance what you’ll do with it:
- Use the trend on the price chart, say a moving average or a series of higher lows, to decide direction.
- Use the RVI crossing its signal line, in that same direction, as a timing nudge.
- Watch for divergences near obvious price levels as an early warning to tighten a stop.
- Decide your exit and position size from price, not from the RVI.
It pairs naturally with a range-based momentum tool. The percentage price oscillator, for example, tells you how stretched price is against its averages, while the RVI tells you whether individual sessions are closing with conviction. When both agree, the read is stronger than either alone.
Quick recap
The relative vigor index compares each bar’s close with its open and scales the result by the bar’s range. A 1-2-2-1 weighting smooths four bars at a time, an N-period average smooths it again, and a signal line is built from the RVI with the same weighting. Above zero means recent closes have been beating their opens; below zero means the reverse. Crossovers and divergences are the two common signals. It’s slow, it ignores gaps, and it chops around in flat markets, so use it as a conviction check alongside price, not as the whole plan.
Disclaimer: This article is for educational purposes only and is not investment advice. The worked example uses hypothetical numbers, not real stock prices. Trading and investing involve risk; please do your own research or consult a SEBI-registered adviser before making any investment decision.

Leave a Reply
Join the conversation
Commenting is open to registered readers. Sign up with just your email — no password needed, and it takes under a minute.
Sign up to comment Log in