Plotting - candlestick charts and highlighting economic/news events
-
Hi, is it possible to plot the chart as a candlestick/bar chart instead of a line chart?
Another question, I am trying to incorporate economic events/data into Backtrader. Any suggestions on how to feed the events into Backtrader, and is it possible to highlight bars where major data has been released? Thanks!
-
There are some tens of samples plotting candlesticks and/or bars.
Check here for the option
style
when plotting: Docs - PlottingYou can extend a data feed to have extra data Docs - Extending a Data Feed which can be the
P/E
ratio like in that case or anything you like.To Plot the events the best options would be:
-
Creating an
Indicator
that only delivers a point when an economic event happens. Assign thehigh
or thelow
and plot and arrow/triangle or other marker -
The same but with an
Observer
. In this blog post, the triangles of theBuySell
observer are changed to arrows Blog - Arrows for the BuySell ObserverYour best option is to check the source for the
BuySell
observer or theTrades
observer and plot the economic events instead of the operations/trades.
-
-
@kicking_potato88 hi did you find a good solution yet for plotting economic news events into Backtrader. I am trying to do the same.
-
Could someone please share the example code of plotting economic events? @kicking_potato88 @Syed-Javed-Gardezi @backtrader