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.





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) ;

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