1.0 Error
Traceback (most recent call last): File "D:/PycharmProjects/dbpower.backtrader.001/app/main_machine_learning.py", line 191, in <module> img = cerebro.plot(style='line', plotdist=0.1, grid=True) File "D:\PycharmProjects\dbpower.backtrader.001\app\venv\lib\site-packages\backtrader\cerebro.py", line 991, in plot start=start, end=end, use=use) File "D:\PycharmProjects\dbpower.backtrader.001\app\venv\lib\site-packages\backtrader\plot\plot.py", line 119, in plot if not strategy.datas: AttributeError: 'OptReturn' object has no attribute 'datas'
'OptReturn' object has no attribute 'datas'
2.0 Fix
cerebro = bt.Cerebro(stdstats=True, cheat_on_open=True, optreturn=False)
optreturn=False