Relative Vigor Index (RVI) is an insightful tool for traders, based on the principle that closing prices tend to be higher than opening prices during an uptrend.
Conversely, in a downtrend, the opposite holds true. The RVI essentially normalizes price changes by dividing the difference between the closing and opening prices by the maximum price range within a single bar, represented by the formula:
RVI = (CLOSE - OPEN) / (HIGH - LOW)
- OPEN - the opening price;
- HIGH - the highest price;
- LOW - the lowest price;
- CLOSE - the closing price.
To smooth out erratic price movements, the oscillator applies a smoothing technique. The signal line is derived in the same manner. What sets this version of RVI apart is the flexibility it offers; you can tweak both the RVI and the signal line's smoothing algorithms, choosing from ten different methods:
- SMA - Simple Moving Average;
- EMA - Exponential Moving Average;
- SMMA - Smoothed Moving Average;
- LWMA - Linear Weighted Moving Average;
- JJMA - JMA Adaptive Average;
- JurX - Ultralinear Smoothing;
- ParMA - Parabolic Smoothing;
- T3 - Tillson's Multiple Exponential Smoothing;
- VIDYA - Smoothing with Tushar Chande's Algorithm;
- AMA - Smoothing with Perry Kaufman's Algorithm.
It's important to note that the Phase parameter varies significantly with different smoothing algorithms:
- For JMA, it's an external Phase variable ranging from -100 to +100.
- For T3, it's a smoothing ratio multiplied by 100 for clearer visualization;
- For VIDYA, it corresponds to the CMO period; for AMA, it indicates the slow EMA period;
- In the case of AMA, the fast EMA period is fixed at a value of 2 by default, and the raising power ratio is also set to 2.
The indicator employs the SmoothAlgorithms.mqh library classes, which must be copied into the terminal_data_folder\MQL5\Include. For an in-depth look at how to utilize these classes, check out the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".


Comments 0