Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. rluc99
    3. Topics
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 16
    • Best 3
    • Groups 0

    Topics created by rluc99

    • R

      Starting with Interactive Brokers (IB) - no data feed
      General Code/Help • • rluc99

      21
      0
      Votes
      21
      Posts
      4395
      Views

      SPECULARI FUND

      @rluc99 said in 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

      So, it's not possible to get even delayed stock data from IB using Backtrader for not funded account right?

    • R

      Plotting time tick labels
      General Code/Help • • rluc99

      5
      1
      Votes
      5
      Posts
      1012
      Views

      R

      @backtrader once again - thanks for the rapid response. This suggestion fixed it!
      timeframe=bt.TimeFrame.Minutes
      ...also discovered reference to this can be found in "Data Feeds"!
      The documentation is excellent, the reader is flawed!!

    • R

      Typo in https://www.backtrader.com/docu/concepts/
      General Discussion • • rluc99

      2
      0
      Votes
      2
      Posts
      91
      Views

      B

      Corrected

    • R

      Basic Plotting - No X Axis
      General Code/Help • • rluc99

      6
      3
      Votes
      6
      Posts
      1714
      Views

      A

      Hi, i need some help please. I tried to install matplotlib as you say but now i cant run the plot. i tried to change versions, reinstall anoaconda but now always have the same error and i cant show the plots as always. It give me this error:

      TypeError Traceback (most recent call last)
      <ipython-input-8-cf679b847698> in <module>
      1 # cerebro.plot(start=datetime.date(2005, 7, 1), end=datetime.date(2006, 1, 31))
      2
      ----> 3 fig = cerebro.plot(style='candle', numfigs=1, barup ='gold', bardown ='darkgoldenrod', valuetags=False, rowsmajor=5, rowsminor=2, plotdist=0.1)[0][0]
      4 fig.savefig('example.png', dpi=400)
      5 #figure = cerebro.plot(style ='candlebars')[0][0]

      ~\Anaconda3\lib\site-packages\backtrader\cerebro.py in plot(self, plotter, numfigs, iplot, start, end, width, height, dpi, tight, use, **kwargs)
      972
      973 if not plotter:
      --> 974 from . import plot
      975 if self.p.oldsync:
      976 plotter = plot.Plot_OldSync(**kwargs)

      ~\Anaconda3\lib\site-packages\backtrader\plot_init_.py in <module>
      31
      32
      ---> 33 from .plot import Plot, Plot_OldSync
      34 from .scheme import PlotScheme

      ~\Anaconda3\lib\site-packages\backtrader\plot\plot.py in <module>
      33 import numpy as np # guaranteed by matplotlib
      34 import matplotlib.dates as mdates
      ---> 35 import matplotlib.font_manager as mfontmgr
      36 import matplotlib.legend as mlegend
      37 import matplotlib.ticker as mticker

      ~\AppData\Roaming\Python\Python37\site-packages\matplotlib\font_manager.py in <module>
      46
      47 import matplotlib as mpl
      ---> 48 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
      49 from matplotlib.fontconfig_pattern import (
      50 parse_fontconfig_pattern, generate_fontconfig_pattern)

      ~\AppData\Roaming\Python\Python37\site-packages\matplotlib\afm.py in <module>
      358
      359
      --> 360 @deprecated("3.0", "Use the class AFM instead.")
      361 def parse_afm(fh):
      362 return _parse_afm(fh)

      TypeError: deprecated() takes 1 positional argument but 2 were given

    • 1 / 1