Mastering the XRVI Indicator for MetaTrader 5: A Trader's Guide

Mike 2011.10.26 02:07 65 0 0
Attachments

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)

where:
  • 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:

  1. SMA - Simple Moving Average;
  2. EMA - Exponential Moving Average;
  3. SMMA - Smoothed Moving Average;
  4. LWMA - Linear Weighted Moving Average;
  5. JJMA - JMA Adaptive Average;
  6. JurX - Ultralinear Smoothing;
  7. ParMA - Parabolic Smoothing;
  8. T3 - Tillson's Multiple Exponential Smoothing;
  9. VIDYA - Smoothing with Tushar Chande's Algorithm;
  10. 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".

XRVI indicator

List
Comments 0