OPEN-SOURCE SCRIPT
Dual RVI Divergence Detector: Volatility + Vigor

This script combines two distinct but complementary momentum oscillators—the Relative Volatility Index (RVI Volatility) by Donald Dorsey and the Relative Vigor Index (RVI Vigor) by John Ehlers—into a single, unified divergence detection system.
Why combine them?
RVI Volatility measures the directional consistency of volatility, helping identify overbought/oversold conditions based on price dispersion.
RVI Vigor measures the strength of price movement relative to its range, reflecting market conviction through the relationship between open/close and high/low.
While both are called "RVI", they are fundamentally different indicators with unique mathematical foundations. Using them together provides convergent confirmation: when both oscillators show bullish (or bearish) divergence at the same time, the signal gains statistical robustness. This reduces false positives compared to using either in isolation.
Key Original Enhancements (by Carlos Mauricio Vizcarra, 2025):
Dynamic normalization: The Vigor oscillator (normally centered near 0) is scaled to the 0–100 range of the Volatility RVI, enabling direct visual comparison in a single panel without distortion.
Independent divergence logic: Each oscillator retains its own pivot detection, divergence conditions (regular + hidden), and visual markers ("R"/"H" labels + connecting lines).
User-controlled visibility: Traders can toggle each RVI on/off to focus on one signal or compare both.
Full compliance with MPL 2.0: Original authors are credited, and all reused concepts are properly attributed.
How to Use:
Look for aligned divergences (e.g., bullish divergence on both RVIs) for high-probability reversals.
Use hidden divergences for trend-continuation signals.
The SMA filters (configurable) help smooth noise.
All alerts are included for automated scanning.
Note: This is not a simple "mashup". It solves a real analytical problem: comparing structurally different oscillators on equal visual footing while preserving their unique divergence behaviors—something not available in any single existing indicator.
Additional Compliance Notes :
No emoji or non-ASCII characters in title
English-first description (you may add Spanish after if desired)
Clear justification for combining two indicators
Explanation of calculations (Dorsey vs. Ehlers)
Highlight of original contributions (normalization, dual divergence logic, UI controls)
No promotion, links, or contact info
Clean chart recommended: publish with only this script active, no other indicators or drawings
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。