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/

    backfill_from issue with oandastore

    General Code/Help
    2
    4
    242
    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.
    • Farout Al
      Farout Al last edited by

      Im trying to do a backfill from static data using "backfill_from" using oandastore as per code below:

      dataBackfill = bt.feeds.PandasData(dataname=dataframe)            
      
      data = oandastore.getdata(dataname=args.pair, backfill_from=dataBackfill,timeframe=bt.TimeFrame.Minutes, compression=1)
      
      

      I get the following error when running:

      
        File "C:\ProgramData\Anaconda3\lib\site-packages\backtrader\feed.py", line 196, in _start_finish
          self._calendar = self._env._tradingcal
      
        File "C:\ProgramData\Anaconda3\lib\site-packages\backtrader\lineseries.py", line 461, in __getattr__
          return getattr(self.lines, name)
      
      AttributeError: 'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute '_env'
      

      Anyone have any idea what its complaining about?
      "AttributeError: 'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute '_env'"

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        Let's assume you are using this: https://github.com/ftomassetti/backtrader-oandav20

        You'd be better off posting in the project.

        1 Reply Last reply Reply Quote 0
        • Farout Al
          Farout Al last edited by

          Thanks for the reply.
          Im using Oanda v1 as per backtrader docs. Everything works in terms live data feed or adding static data from file or pandas but the backfill_from is giving me trouble.
          In any case ill try to migrate to v20 and see if i get the same troubles.

          1 Reply Last reply Reply Quote 0
          • Farout Al
            Farout Al last edited by

            Was an issue solved with new commit
            https://github.com/ftomassetti/backtrader-oandav20/issues/35

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors