So I've encountered a problem - I have a lot of 1 min data, but my strategy works better on longer timeframes and backtrader has some problems with backtesting on 1 mln rows.

I want to convert it to 1h/4h/1d timeframes, tried to convert to 4h just by selecting every 240th candle but not sure that's the right way, any thoughts on how to do it?


1 Answer 1


You need to get the open of the first candle, the high and low over all candles in the time frame and the close of the last candle.

R has a package for this, your language of choice might have it as well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.