Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Error: bt.stores.IBStore

    General Code/Help
    2
    2
    1071
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tommark last edited by tommark

      Please pardon this seemingly basic question - it has bugged me.

      for the codes in https://www.backtrader.com/docu/live/ib/ib.html:

      import backtrader as bt
      ibstore = bt.stores.IBStore(host='127.0.0.1', port=7496, clientId=35)
      data = ibstore.getdata(dataname='EUR.USD-CASH-IDEALPRO')
      

      I get the error:

      AttributeError Traceback (most recent call last)
      <ipython-input-14-083c713fef7e> in <module>()
      1 import backtrader as bt
      2
      ----> 3 ibstore = bt.stores.IBStore(host='127.0.0.1', port=7496, clientId=35)
      4 data = ibstore.getdata(dataname='EUR.USD-CASH-IDEALPRO')
      AttributeError: module 'backtrader.stores' has no attribute 'IBStore'

      I wonder why this error happened and how can I fix it?
      Seems like on https://github.com/mementum/backtrader/blob/master/backtrader/stores/ibstore.py
      The file path is backtrader/backtrader/stores/ibstore.py, rather than bt.stores.IBStore in caps?

      1 Reply Last reply Reply Quote 1
      • P
        Paska Houso last edited by

        I would rather bet that ibpy is not installed. Just test it ...

        import ib
        import backtrader as bt
        ...
        
        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
        $(document).ready(function () { app.coldLoad(); }); }