Bo, fantastic work!
I am trying to reproduce the basic pyrenko example (https://github.com/quantroom-pro/pyrenko/blob/master/pyrenko_tutorial.ipynb) inside backtrader, but unfortunately I am pretty new in backtrader and can't adapt your code. Main idea is only to compute the output inside backtrader and maybe plot some basic Renko's.
I also try to use your class in most basic quick start guide: https://www.backtrader.com/docu/quickstart/quickstart/ but obtain some errors:
AttributeError Traceback (most recent call last) <ipython-input-140-d76f523e9db2> in <module> 1 optimal_brick = Renko(auto = False) 2 renko_obj_atr = Renko(data) ----> 3 renko_obj_atr.build_history(data) 4 renko_obj_atr.plot_renko() <ipython-input-135-0c0ccf80bef5> in build_history(self, prices) 64 # Init by start values 65 self.source_prices = prices ---> 66 self.renko_prices.append(prices.iloc) 67 self.renko_directions.append(0) 68 ~/opt/anaconda3/lib/python3.8/site-packages/backtrader/lineseries.py in __getattr__(self, name) 459 # in this object if we set an attribute in this object it will be 460 # found before we end up here --> 461 return getattr(self.lines, name) 462 463 def __len__(self): AttributeError: 'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute 'iloc'
Should be possible that you put here some psudo-code to get started with pyrenko inside backtrader? If so I would be more than grateful and could help with documentation and ongoing work if you need it.