RSI based on OHLC4

 
How to code RSI based on OHLC4 for MT4? Please guide me.
 
427972: How to code RSI based on OHLC4 for MT4? Please guide me.

Take the example RSI in the CodeBase,and modify it for True Price (OHLC4).

From:

diff=close[i]-close[i-1]; // Line 94 & 118

To:

diff = ( ( open[i]+high[i]+low[i]+close[i] ) - ( open[i-1]+high[i-1]+low[i-1]+close[i-1] ) ) * 0.25; // Line 94 & 118


Relative Strength Index
Relative Strength Index
  • www.mql5.com
Relative Strength Index technical indicator.