Calculating RSI over previous n bars

I’m trying to work out how to get values for RSI over the previous n bars.

I can get the current RSI value - RSI(BARS=14) however how can I determine what RSI was 1 bar ago, 2 bars ago, etc? I couldn’t see how to apply an offset.

 

Thanks
Steve

 

 

Hi Steve,

There are two ways to do it. The first is to setup the RSI as a variable then use the square bracket offset feature.

Example of 14 period RSI show the value of 10 bars ago:

V1 = RSI(BARS=14) ;
V1[10]

You can achieve the same result by wrapping the RSI in an Offset function.

OFFSET(RSI(BARS=14), OFFSET=10)