Hi fellow backtraders!
I have just started familiarizing myself with Backtrader. I have a newbie question for you:
Using the examples in the Quickstart guide I got to the section on plotting.
https://www.backtrader.com/docu/quickstart/quickstart/#visual-inspection-plotting
I copied the code exactly and got an identical plot except the x axis (date) is not showing at all. The cursor gives the right dates but there is no text on the axis. What have I forgotten?!
Thanks
(PS: Also, is there a place in Backtrader Community for newbies like me to look at first to find the usual gotchas.)
Best posts made by rluc99
-
Basic Plotting - No X Axis
-
RE: Starting with Interactive Brokers (IB) - no data feed
I have discovered the problem. It is not related to Backtrader.
I did some digging around on the IB website. It seems that the IB demo account does not allow historical bars through the API for anything other than FOREX. The same applies to paper trading or live accounts unless there is a subscription to the relevant market data feed. If there is a subscription in place then the historical bars are available at any time, including week-ends.
(As an aside, historical bars are constructed by TWS regardless of whether there is a subscription in place or not.)
Delayed data is available during market hours for accounts without market data subscription, but to obtain this data a flag has to be set in the API. I don't think Backtrader allows the user to set this flag but I have not investigated this in detail.Most of the above information comes from the following two links:
http://interactivebrokers.github.io/tws-api/market_data.html
http://interactivebrokers.github.io/tws-api/historical_data.html