@backtrader thank you for the explanations.
Yes, I was trying to use one symbol that's trading on pre-market to trigger prenext. As you can see it didn't help much, i.e. it crashed backtrader.
What I was trying to ask (and apparently failed) is: if creating orders without price data supported by backtrader at all? If it's possible then it would be great if you explain how to do it without loading data as @ab_trader suggested. If it's not possible ... well I'll try to work around it using @ab_trader's suggestion.
Thanks for your replies!
I was investigating more and found an issue with my MACD strategy implementation on backtrader. By correcting it, I get almost the exact same trades as on TradingView.
That's a good sign for me that I'm not doing bullshit with backtrader, yay.
Hello @Rubén-Briones, if you are just trying to save the chart, here's the code:
def saveplots(cerebro, numfigs=1, iplot=True, start=None, end=None,
width=16, height=9, dpi=300, tight=True, use=None, file_path = '', **kwargs):
from backtrader import plot
plotter = plot.Plot_OldSync(**kwargs)
plotter = plot.Plot(**kwargs)
figs = 
for stratlist in cerebro.runstrats:
for si, strat in enumerate(stratlist):
rfig = plotter.plot(strat, figid=si * 100,
start=start, end=end, use=use)
# this blocks code execution
for fig in figs:
for f in fig:
cerebro.plot(style = 'candlestick')
saveplots(cerebro,file_path = 'savefig.png')