For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Bug? `AttributeError: 'Cerebro' object has no attribute '_exactbars'`
-
import backtrader as bt cb = bt.Cerebro() cb.run() cb.plot()
Results in:
Traceback (most recent call last): File "src/main.py", line 5, in <module> cb.plot() File "/home/sohail/src/trading/build/venv/lib/python3.6/site-packages/backtrader/cerebro.py", line 970, in plot if self._exactbars > 0: AttributeError: 'Cerebro' object has no attribute '_exactbars'
-
@Cheez said in Bug? `AttributeError: 'Cerebro' object has no attribute '_exactbars'`:
import backtrader as bt
cb = bt.Cerebro() cb.run() cb.plot()
This was mentioned a long time ago which a quick google search has uncovered:
https://community.backtrader.com/topic/594/cerebro-object-has-no-attribute-_exactbars-pandas-csv/3
You need to a bit more ... like adding a data feed.