How to calculate RSI(14) of 1-min selected bar?

Hi everyone!

I dont know how to calculate RSI(14) for timeframe 15-mins, 30-mins and 1-hour of 1-min selected bar. I already set "Periodicity = 1 Minute" for Backtester settings.

If use TimeFrameExpand() function with expandFirst or expandLast, I only get value of the end bar of timeframe (15-mins, 30-mins and 1-hour).

Please help me, how to know? Thank you so much!

You want TimeFrameCompress() to go from 1-min to a slower timeframe like 15-min, not TimeFrameExpand().

1 Like

No. I want to see RSI 15-mins on 1-min timeframe. So must TimeFrameExpand(). When we are backtest, with timeframe 15-mins on 1-min can not get RSI at 10:16, 10:17, 10:18, 10:19 like BarReplay process.

Post your whole code.
TimeFrameExpand() cant be used just like that, independently.
it will be in conjunction with other TimeFrame related functions so until you don't show what you are doing, its difficult to even guess.

1 Like

@diamond: if you are running on a 1-minute base timeframe and you want to calculate RSI on 15-minute bars, you have to use TimeFrameCompress() to create the array of 15-minute bars. As @travick pointed out, you won't get the results that you probably want if use TimeFrameExpand() in isolation. As always, posting your code would be helpful.

1 Like