@backtrader Thank you for the quick reply! I did see the this page where it leverages IBBroker as a store. But as I am trying to connect to a Exchange say Bitfinex, is there documentation i can create for custom Broker?
Latest posts made by newtrader
RE: Anyone using Backtrader for live trading
@backtrader I just recently started using backtrader (this is such a great learning experience) for backtesting. I wanted to use my strategy to place orders on a Bitcoin exchange. I have a pipe producing the data and the backtesting runs successfully using that same data.
But, where exactly should I place the code to make the calls to brokers api?
if self.dataclose < self.dataclose[-1]:
# current close less than previous close
if self.dataclose[-1] < self.dataclose[-2]: # previous close less than the previous close # BUY, BUY, BUY!!! (with default parameters) self.log('BUY CREATE, %.2f' % self.dataclose) # Keep track of the created order to avoid a 2nd order self.order = self.buy() # Should this be replaced by e.g self.order = my_api.sell() ???