Only Close data being plotted
I am trying to plot Open,High,Low,Close using GenericCSVData, but all I get is the close being plotted as a line.
Here's a line of code of the csv:
Here's my code:
import backtrader as bt cerebro = bt.Cerebro() data = bt.feeds.GenericCSVData(dataname='data/1jan2020.csv', dtformat=2) cerebro.adddata(data) cerebro.run() cerebro.plot()
How do I plot the open,high,low,close too like :
You need to instruct cerebro to plot candlestick. Use cerebro.plot(style='candlestick').