I'm trying to use the CCXTStore library to create a backtrader Strategy that uses multiple timeframes (1h and 5m). For that I need to figure out how to add additional datafeeds into Cerebro.
With CSV data it is easy, I can simply create two data objects and add them to Cerebro one-by-one with adddata method. However, this does not work with CCXTStore.
Is it possible to add multiple timeframes using CCXTStore and how?
The closest topic on this that I found is this from the backtrader community forum. I also created a new post there as well, but seems that this community does not have that many participants these days.
To add additional datafeeds into Cerebro using CCXTStore, you can use the adddata method of the Cerebro object. This method takes a data parameter, which can be an instance of the CCXTStore class configured with the desired exchange and timeframes.
For example:
To add multiple timeframes, you can simply create additional instances of the CCXTStore class with different timeframes and add them to the Cerebro object using the adddata method.
For example: