iRSIOnArray for MT5 – library MetaTrader 5

This header provides the iRSIOnArray function known from MT4. It works with both MQL 4 and 5 code. A reason to use it also under MT4 could be that it fixes a bug known in the original function, where a constantly increasing array – like 100,101,102 – returns an RSI of 0 instead of 100.

Usage:

#include <RSIOnArray.mqh>

int OnInit()
Β Β {
Β Β  double array[]={100,101,102};
Β Β  int total=0;
Β Β  int period=2;
Β Β  int shift=0;
Β Β  double rsi=iRSIOnArray(array,total,period,shift);

πŸ“ˆ ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks