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

Broker and fundmode

  • with the latest version when using oanda broker, it breaks with follwing code:

    File "/usr/local/lib/python2.7/dist-packages/backtrader/observers/", line 100, in start
    self._fundmode =
    AttributeError: 'OandaBroker' object has no attribute 'fundmode'

    does anyone know, how to fix this?

  • administrators

    The latest (would be good to quote the actual version) keeps on adding auto-detection of fundmode for things to switch the presentation/results.

    That particular observer was touched and the error shows that a couple of corners in adding some abstraction for fundmode could be there.

    Since you are using Oanda let's assume you don't want to plot. Run with:

    If you are using Oanda for some backtesting (rather than live trading) and need plotting, you can re-add observers as needed (or else revert to

    It will be fixed in the development branch

  • @backtrader i tried and, reverting to a version prior to the funds functionality works.

    Also using stdstats=False works.

    Thanks a lot for your help and this great software.

  • administrators

    @dasch said in Broker and fundmode:


    Corrected in the development branch by having default no-op methods in the broker abstraction

Log in to reply