This repository was archived by the owner on Mar 24, 2023. It is now read-only.
RuntimeError #73
Unanswered
haliluyaya
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(1)os:win10
python:3.8.3
backtrader:1.9.76.123
backtrader-plotting:1.1.0
(2)I wrote a bt strategy, it runs perfectly. But when I want to plot with:
b = Bokeh(style='bar',plot_mode='single',tabs='multi',scheme=Tradimo())
cerebro.plot(b)
(3)it feedback a RuntimeError:
_Traceback (most recent call last):
File "D:\6mylove\5重写回测框架\Turtle.py", line 329, in
cerebro.plot(b)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader\cerebro.py", line 989, in plot
rfig = plotter.plot(strat, figid=si * 100,
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\bokeh.py", line 509, in plot
self._blueprint_strategy(obj, start, end, tradingdomain, **kwargs)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\bokeh.py", line 244, in _blueprint_strategy
figure.plot(master, None)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\figureenvelope.py", line 301, in plot
self.plot_indicator(obj, master)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\figureenvelope.py", line 459, in plot_indicator
self._plot_indicator_observer(obj, master)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\figureenvelope.py", line 462, in _plot_indicator_observer
pl = plotobj2label(obj)
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\label_resolver.py", line 49, in plotobj2label
return f'{indicator2label(obj)}@{indicator2fullid(obj)}'
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\label_resolver.py", line 79, in indicator2fullid
return datatarget2label([x._owner]) + '[L]'
File "D:\SoftWare\anaconda\lib\site-packages\backtrader_plotting\bokeh\label_resolver.py", line 32, in datatarget2label
raise RuntimeError(f'Unexpected data type: {d.class}')
RuntimeError: Unexpected data type: <class 'main.TurtleStrategy'>_
Beta Was this translation helpful? Give feedback.
All reactions