XRVI - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources

The Relative Vitality Index (RVI) calculation is based on the idea that during an uptrend the closing price is usually higher than the opening price.
In the case of a downtrend, the opposite is true. Divide the price change by the maximum price range within a bar to normalize the index:
RVI = (closing price - opening price) / (highest price - lowest price)
The oscillator is smoothed to exclude occasional price fluctuations. Signal lines are generated in the same way. The main advantage of this well-known indicator variant is the possibility to change the RVI and signal line smoothing algorithms by choosing one of the ten existing algorithms:
It should be noted that the Phase parameter has completely different meanings for different smoothing algorithms.
The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Attachment download
📎 smoothalgorithms.mqh (133.8 KB)
📎 xrvi.mq5 (9.13 KB)
Source: MQL5 #506
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •