dear api support,
i'm trying to get values of RSI of two previous bars, however the values are quite different from values on chart.
also tried using filters without much success. my code is below
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
double prevRSI2 = indicators.rsi(instrument, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 14, 2);
double prevRSI1 = indicators.rsi(instrument, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 14, 1);
print("RSI of 2nd last bar: " + prevRSI2 + " and RSI of last bar: " + prevRSI1);
}please help!