PROTECTED SOURCE SCRIPT
RVI - Relative Vigor Index | With Critical Levels

📊 RVI - Relative Vigor Index | With Critical Levels (±0.23)
═════════════════════════════════════════════════════════════
📌 OVERVIEW
═════════════════════════════════════════════════════════════
The Relative Vigor Index (RVI) is a momentum oscillator that measures the strength of a trend by comparing the closing price to the trading range of a given period. The core principle behind RVI is simple yet powerful: in bullish markets, prices tend to close higher than they open, while in bearish markets, prices tend to close lower than they open. By quantifying this relationship, RVI provides traders with a reliable tool for identifying trend direction, momentum shifts, and potential reversal points.
Originally developed by John Ehlers and introduced in the January 2002 issue of "Technical Analysis of Stocks & Commodities" magazine, the RVI applies a symmetric weighted moving average (similar to a digital signal processing filter) to smooth out market noise while preserving meaningful price action signals. This makes it particularly effective on shorter timeframes where noise reduction is critical.
This implementation includes pre-set critical levels at +0.23 and -0.23, which have been calibrated through extensive observation on XAUUSD (Gold) M5 charts. These levels serve as overbought and oversold thresholds, helping traders identify high-probability reversal zones when combined with additional confirmation tools.
═════════════════════════════════════════════════════════════
📐 CALCULATION METHODOLOGY
═════════════════════════════════════════════════════════════
The RVI calculation follows a multi-step process designed to extract the true momentum signal from raw price data:
STEP 1 — VIGOR MEASUREMENT:
For each bar, the difference between Close and Open is calculated. This value represents the "vigor" or internal strength of that particular candle. A positive value indicates bullish vigor (buyers dominated), while a negative value indicates bearish vigor (sellers dominated).
STEP 2 — SYMMETRIC WEIGHTED SMOOTHING (NUMERATOR):
To reduce noise and give more weight to recent bars, a 4-bar symmetric weighted average is applied:
Numerator = (Close-Open) + 2×(Close[1]-Open[1]) + 2×(Close[2]-Open[2]) + (Close[3]-Open[3])
The weighting scheme (1-2-2-1) acts as a finite impulse response (FIR) filter, which is superior to simple moving averages for preserving signal integrity while eliminating random fluctuations.
STEP 3 — RANGE NORMALIZATION (DENOMINATOR):
The same symmetric weighting is applied to the High-Low range to normalize the vigor measurement relative to volatility:
Denominator = (High-Low) + 2×(High[1]-Low[1]) + 2×(High[2]-Low[2]) + (High[3]-Low[3])
This normalization ensures that the RVI output is comparable across different volatility regimes and instruments.
STEP 4 — SUMMATION AND DIVISION:
Both the numerator and denominator are summed over the user-defined period (default: 10 bars), and the RVI value is obtained by dividing the two:
RVI = Sum(Numerator, Period) / Sum(Denominator, Period)
The resulting value oscillates around zero with no fixed upper or lower boundary, though in practice it rarely exceeds ±0.5.
STEP 5 — SIGNAL LINE:
A signal line is derived from the RVI using another symmetric weighted average:
Signal = (RVI + 2×RVI[1] + 2×RVI[2] + RVI[3]) / 6
The crossover between the RVI line and the Signal line generates trading signals similar to MACD crossovers, but based on open-close dynamics rather than moving average convergence.
════════════════════════════════════════════════════════════
📏 LEVEL DEFINITIONS AND INTERPRETATION
═════════════════════════════════════════════════════════════
🟡 +0.23 LEVEL (Upper Yellow Dashed Line):
When RVI crosses above +0.23, momentum has reached an extreme bullish state. While this confirms strong upward pressure, it also signals that the move may be overextended. Traders should watch for:
• RVI crossing back below +0.23 as a potential sell trigger
• RVI-Signal line bearish crossover above this level
• Divergence between price making new highs while RVI fails to do so
This level does NOT mean "sell immediately" — it means "be cautious about opening new longs and start watching for reversal confirmation."
⚪ ZERO LINE (Gray Dotted Line):
The zero line represents the equilibrium between bullish and bearish vigor. Key interpretations:
• RVI crossing above zero → Bullish momentum is taking control
• RVI crossing below zero → Bearish momentum is taking control
• Extended periods above/below zero confirm trend persistence
• Quick crosses back and forth indicate a ranging or indecisive market
🟡 -0.23 LEVEL (Lower Yellow Dashed Line):
When RVI drops below -0.23, momentum has reached an extreme bearish state. While this confirms strong selling pressure, it also warns that the decline may be reaching exhaustion. Traders should watch for:
• RVI crossing back above -0.23 as a potential buy trigger
• RVI-Signal line bullish crossover below this level
• Divergence between price making new lows while RVI fails to do so
Similar to the upper level, this does NOT mean "buy immediately" — it means "be cautious about opening new shorts and start watching for reversal confirmation."
═════════════════════════════════════════════════════════════
🎯 TRADING APPLICATIONS
═════════════════════════════════════════════════════════════
1. TREND CONFIRMATION:
• RVI consistently above zero → Uptrend is healthy
• RVI consistently below zero → Downtrend is healthy
• Use this to confirm signals from other indicators or price action patterns
2. CROSSOVER SIGNALS:
• RVI crosses above Signal line → Bullish momentum increasing
• RVI crosses below Signal line → Bearish momentum increasing
• Crossovers carry more weight when they occur at extreme levels (above +0.23 or below -0.23)
3. DIVERGENCE DETECTION:
• Bullish divergence: Price makes a lower low but RVI makes a higher low → Potential bottom
• Bearish divergence: Price makes a higher high but RVI makes a lower high → Potential top
• Divergences at the ±0.23 levels are particularly significant
4. OVERBOUGHT/OVERSOLD IDENTIFICATION:
• RVI above +0.23 → Overbought zone, watch for bearish reversal signals
• RVI below -0.23 → Oversold zone, watch for bullish reversal signals
• These levels work best when combined with Stochastic, ADX, or other momentum filters
5. ZERO-LINE REJECTION:
• In an uptrend, RVI pulling back to zero and bouncing → Continuation signal
• In a downtrend, RVI rallying to zero and getting rejected → Continuation signal
═════════════════════════════════════════════════════════════
🔗 SUGGESTED COMBINATIONS
═════════════════════════════════════════════════════════════
RVI works best as a confirmation tool rather than a standalone signal generator. Recommended combinations include:
- RVI + STOCHASTIC (14,3,3):
Use Stochastic for overbought/oversold identification (90/10 levels) and RVI for momentum direction confirmation. When both align, signal reliability increases significantly.
- RVI + ADX (14):
Use ADX to measure trend strength. When ADX > 25, only take RVI signals in the direction of the trend. When ADX < 20, RVI mean-reversion signals (at ±0.23) become more effective.
- RVI + EMA CROSSOVER:
Use EMA (21/55 or 50/200) to determine the dominant trend direction, then use RVI crossovers and level breaks to time entries within that trend.
- RVI + PRICE ACTION:
Look for RVI divergences at key support/resistance levels, supply/demand zones, or Fibonacci retracement levels for high-conviction trade setups.
═════════════════════════════════════════════════════════════
⚙️ SETTINGS
═════════════════════════════════════════════════════════════
- RVI Period (Default: 10)
Controls the lookback period for the summation. Lower values (7-8) make the indicator more responsive but noisier. Higher values (12-14) produce smoother signals with more lag. The default of 10 provides a balanced approach suitable for most timeframes.
- Upper Level (Default: 0.23)
The overbought threshold. Adjust based on the instrument and timeframe. For higher timeframes (H1, H4), consider using 0.20. For very short timeframes (M1), consider 0.25-0.30.
- Lower Level (Default: -0.23)
The oversold threshold. Should mirror the upper level. Adjust symmetrically with the upper level.
═════════════════════════════════════════════════════════════
📋 VISUAL GUIDE
═════════════════════════════════════════════════════════════
- Green Line (Thicker) → RVI Main Line
- Red Line (Thinner) → Signal Line
- Yellow Dashed Lines → ±0.23 Critical Levels
- Gray Dotted Line → Zero Line (Neutral)
═════════════════════════════════════════════════════════════
⚠️ DISCLAIMER
═════════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or trading advice. No indicator can predict future price movements with certainty. Always use proper risk management, test thoroughly on demo accounts before live trading, and never risk more than you can afford to lose. Past performance does not guarantee future results. The ±0.23 levels are observational guidelines, not guaranteed reversal points. Always seek confirmation from multiple sources before making trading decisions.
═════════════════════════════════════════════════════════════
If you find this indicator useful, please consider giving it a like 👍
Feel free to leave comments or suggestions for improvement.
Happy trading! 🚀
═════════════════════════════════════════════════════════════
📌 OVERVIEW
═════════════════════════════════════════════════════════════
The Relative Vigor Index (RVI) is a momentum oscillator that measures the strength of a trend by comparing the closing price to the trading range of a given period. The core principle behind RVI is simple yet powerful: in bullish markets, prices tend to close higher than they open, while in bearish markets, prices tend to close lower than they open. By quantifying this relationship, RVI provides traders with a reliable tool for identifying trend direction, momentum shifts, and potential reversal points.
Originally developed by John Ehlers and introduced in the January 2002 issue of "Technical Analysis of Stocks & Commodities" magazine, the RVI applies a symmetric weighted moving average (similar to a digital signal processing filter) to smooth out market noise while preserving meaningful price action signals. This makes it particularly effective on shorter timeframes where noise reduction is critical.
This implementation includes pre-set critical levels at +0.23 and -0.23, which have been calibrated through extensive observation on XAUUSD (Gold) M5 charts. These levels serve as overbought and oversold thresholds, helping traders identify high-probability reversal zones when combined with additional confirmation tools.
═════════════════════════════════════════════════════════════
📐 CALCULATION METHODOLOGY
═════════════════════════════════════════════════════════════
The RVI calculation follows a multi-step process designed to extract the true momentum signal from raw price data:
STEP 1 — VIGOR MEASUREMENT:
For each bar, the difference between Close and Open is calculated. This value represents the "vigor" or internal strength of that particular candle. A positive value indicates bullish vigor (buyers dominated), while a negative value indicates bearish vigor (sellers dominated).
STEP 2 — SYMMETRIC WEIGHTED SMOOTHING (NUMERATOR):
To reduce noise and give more weight to recent bars, a 4-bar symmetric weighted average is applied:
Numerator = (Close-Open) + 2×(Close[1]-Open[1]) + 2×(Close[2]-Open[2]) + (Close[3]-Open[3])
The weighting scheme (1-2-2-1) acts as a finite impulse response (FIR) filter, which is superior to simple moving averages for preserving signal integrity while eliminating random fluctuations.
STEP 3 — RANGE NORMALIZATION (DENOMINATOR):
The same symmetric weighting is applied to the High-Low range to normalize the vigor measurement relative to volatility:
Denominator = (High-Low) + 2×(High[1]-Low[1]) + 2×(High[2]-Low[2]) + (High[3]-Low[3])
This normalization ensures that the RVI output is comparable across different volatility regimes and instruments.
STEP 4 — SUMMATION AND DIVISION:
Both the numerator and denominator are summed over the user-defined period (default: 10 bars), and the RVI value is obtained by dividing the two:
RVI = Sum(Numerator, Period) / Sum(Denominator, Period)
The resulting value oscillates around zero with no fixed upper or lower boundary, though in practice it rarely exceeds ±0.5.
STEP 5 — SIGNAL LINE:
A signal line is derived from the RVI using another symmetric weighted average:
Signal = (RVI + 2×RVI[1] + 2×RVI[2] + RVI[3]) / 6
The crossover between the RVI line and the Signal line generates trading signals similar to MACD crossovers, but based on open-close dynamics rather than moving average convergence.
════════════════════════════════════════════════════════════
📏 LEVEL DEFINITIONS AND INTERPRETATION
═════════════════════════════════════════════════════════════
🟡 +0.23 LEVEL (Upper Yellow Dashed Line):
When RVI crosses above +0.23, momentum has reached an extreme bullish state. While this confirms strong upward pressure, it also signals that the move may be overextended. Traders should watch for:
• RVI crossing back below +0.23 as a potential sell trigger
• RVI-Signal line bearish crossover above this level
• Divergence between price making new highs while RVI fails to do so
This level does NOT mean "sell immediately" — it means "be cautious about opening new longs and start watching for reversal confirmation."
⚪ ZERO LINE (Gray Dotted Line):
The zero line represents the equilibrium between bullish and bearish vigor. Key interpretations:
• RVI crossing above zero → Bullish momentum is taking control
• RVI crossing below zero → Bearish momentum is taking control
• Extended periods above/below zero confirm trend persistence
• Quick crosses back and forth indicate a ranging or indecisive market
🟡 -0.23 LEVEL (Lower Yellow Dashed Line):
When RVI drops below -0.23, momentum has reached an extreme bearish state. While this confirms strong selling pressure, it also warns that the decline may be reaching exhaustion. Traders should watch for:
• RVI crossing back above -0.23 as a potential buy trigger
• RVI-Signal line bullish crossover below this level
• Divergence between price making new lows while RVI fails to do so
Similar to the upper level, this does NOT mean "buy immediately" — it means "be cautious about opening new shorts and start watching for reversal confirmation."
═════════════════════════════════════════════════════════════
🎯 TRADING APPLICATIONS
═════════════════════════════════════════════════════════════
1. TREND CONFIRMATION:
• RVI consistently above zero → Uptrend is healthy
• RVI consistently below zero → Downtrend is healthy
• Use this to confirm signals from other indicators or price action patterns
2. CROSSOVER SIGNALS:
• RVI crosses above Signal line → Bullish momentum increasing
• RVI crosses below Signal line → Bearish momentum increasing
• Crossovers carry more weight when they occur at extreme levels (above +0.23 or below -0.23)
3. DIVERGENCE DETECTION:
• Bullish divergence: Price makes a lower low but RVI makes a higher low → Potential bottom
• Bearish divergence: Price makes a higher high but RVI makes a lower high → Potential top
• Divergences at the ±0.23 levels are particularly significant
4. OVERBOUGHT/OVERSOLD IDENTIFICATION:
• RVI above +0.23 → Overbought zone, watch for bearish reversal signals
• RVI below -0.23 → Oversold zone, watch for bullish reversal signals
• These levels work best when combined with Stochastic, ADX, or other momentum filters
5. ZERO-LINE REJECTION:
• In an uptrend, RVI pulling back to zero and bouncing → Continuation signal
• In a downtrend, RVI rallying to zero and getting rejected → Continuation signal
═════════════════════════════════════════════════════════════
🔗 SUGGESTED COMBINATIONS
═════════════════════════════════════════════════════════════
RVI works best as a confirmation tool rather than a standalone signal generator. Recommended combinations include:
- RVI + STOCHASTIC (14,3,3):
Use Stochastic for overbought/oversold identification (90/10 levels) and RVI for momentum direction confirmation. When both align, signal reliability increases significantly.
- RVI + ADX (14):
Use ADX to measure trend strength. When ADX > 25, only take RVI signals in the direction of the trend. When ADX < 20, RVI mean-reversion signals (at ±0.23) become more effective.
- RVI + EMA CROSSOVER:
Use EMA (21/55 or 50/200) to determine the dominant trend direction, then use RVI crossovers and level breaks to time entries within that trend.
- RVI + PRICE ACTION:
Look for RVI divergences at key support/resistance levels, supply/demand zones, or Fibonacci retracement levels for high-conviction trade setups.
═════════════════════════════════════════════════════════════
⚙️ SETTINGS
═════════════════════════════════════════════════════════════
- RVI Period (Default: 10)
Controls the lookback period for the summation. Lower values (7-8) make the indicator more responsive but noisier. Higher values (12-14) produce smoother signals with more lag. The default of 10 provides a balanced approach suitable for most timeframes.
- Upper Level (Default: 0.23)
The overbought threshold. Adjust based on the instrument and timeframe. For higher timeframes (H1, H4), consider using 0.20. For very short timeframes (M1), consider 0.25-0.30.
- Lower Level (Default: -0.23)
The oversold threshold. Should mirror the upper level. Adjust symmetrically with the upper level.
═════════════════════════════════════════════════════════════
📋 VISUAL GUIDE
═════════════════════════════════════════════════════════════
- Green Line (Thicker) → RVI Main Line
- Red Line (Thinner) → Signal Line
- Yellow Dashed Lines → ±0.23 Critical Levels
- Gray Dotted Line → Zero Line (Neutral)
═════════════════════════════════════════════════════════════
⚠️ DISCLAIMER
═════════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or trading advice. No indicator can predict future price movements with certainty. Always use proper risk management, test thoroughly on demo accounts before live trading, and never risk more than you can afford to lose. Past performance does not guarantee future results. The ±0.23 levels are observational guidelines, not guaranteed reversal points. Always seek confirmation from multiple sources before making trading decisions.
═════════════════════════════════════════════════════════════
If you find this indicator useful, please consider giving it a like 👍
Feel free to leave comments or suggestions for improvement.
Happy trading! 🚀
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.