Calculating RSI Incrementally with a Ring Buffer in MQL5
Summary
The document describes an MQL5 class for calculating the Relative Strength Index (RSI) with a ring buffer. The class can process a full input array or individual values, and its initialization accepts an RSI period, smoothing method, buffer capacity, and an indexing option. Accessor methods report the required bar count, indicator name, period, smoothing method, and buffer size. The example shows how to calculate RSI from a price series and copy buffered results into an indicator output array.
A second example applies the same value-by-value method to calculate another RSI from an existing indicator series. The notes emphasize that ring-buffer indexing follows time-series order and identify the supporting classes and files needed by the examples. The document is an implementation guide rather than a trading strategy: it gives no entry or exit rules, market tests, or evidence that RSI signals are profitable. Users would still need to verify buffer indexing, initialization, and calculation behavior in their own indicator setup.
Key ideas
- The class calculates RSI using a ring buffer and supports both array-based and value-by-value inputs.
- Initialization sets the RSI period, smoothing method, buffer size, and input indexing convention.
- Buffered RSI values can be copied into a custom indicator's output buffer.
- The guide explains implementation mechanics but provides no evidence about the trading performance of RSI signals.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.