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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.