For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

backfill_from issue with oandastore

  • 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\", line 196, in _start_finish
        self._calendar = self._env._tradingcal
      File "C:\ProgramData\Anaconda3\lib\site-packages\backtrader\", 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'"

  • administrators

    Let's assume you are using this:

    You'd be better off posting in the project.

  • 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.

Log in to reply