Skip to content
All library documents

Using an Array-Based RSI Function in MQL4 and MQL5

Article MQL5 code base

Summary

This brief technical note describes an iRSIOnArray function for calculating the Relative Strength Index from an array in MQL4 or MQL5. It presents the function as an alternative to the built-in MT4 version, citing a reported edge case in which a steadily rising input sequence can incorrectly produce an RSI of zero rather than 100.

A short usage example shows an array of rising values, a period setting, and a shift argument. The note does not explain the function’s full parameter behavior, array ordering requirements, or how it handles other edge cases, and it provides no broader validation or trading application. It is therefore a narrow implementation reference for indicator calculation rather than a strategy or assessment of RSI signals.

Key ideas

  • The function calculates RSI from a supplied array in MQL4 and MQL5.
  • The note reports an MT4 edge case for a steadily increasing series.
  • The example illustrates basic inputs but does not document all usage details.
  • No trading rules or performance evidence are provided.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.