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/

    DrawDown Analyzer Error

    General Code/Help
    3
    6
    1791
    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.
    • C
      cwse last edited by backtrader

      Hi,

      I am trying to run several backtrader analyzers, all appear to be working except "DownDraw", I get the following error:

        File "T:/Google Drive/PyCharm/Backtrader.py", line 381, in RunStrategy
          cerebro.addanalyzer(bt.analyzers.DrawDown)
      AttributeError: module 'backtrader.analyzers' has no attribute 'Drawdown'
      

      Any ideas?

      Thanks,
      CWSE

      1 Reply Last reply Reply Quote 0
      • RandyT
        RandyT last edited by

        @cwse

        The case does not match in the error message and the code example you wrote. Any chance that is the issue?

        Should be as follows in the file.

        cerebro.addanalyzer(bt.analyzers.DrawDown,)
        

        BTW:

        Three backticks before and after a code block will make your code and error messages easier to read in here.
        See the **compose** link in upper right
        
        C 1 Reply Last reply Reply Quote 0
        • C
          cwse @RandyT last edited by

          @RandyT I tried your code line
          '''
          cerebro.addanalyzer(bt.analyzers.DrawDown,)
          '''

          and got the same error.

          B 1 Reply Last reply Reply Quote 0
          • RandyT
            RandyT last edited by

            @cwse, sorry but you aren't giving me enough to go on to be of much help. I can vouch for the fact that it does work.

            There were some recent changes in that area. You should make sure you are running the latest version. Providing more code and a cut and pasted version of the output would be helpful.

            Might be a good place to start with one of the examples that have this installed and working. You can then migrate that code into your own system and figure out what is breaking it.

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

              @cwse said in DrawDown Analyzer Error:

              '''

              The barticks are the ones from the top left corner towards the middle as in `

              The DrawDown analyzer was added to release 1.9.25.105 (previously it was only an Observer)

              1 Reply Last reply Reply Quote 0
              • C
                cwse last edited by

                Thanks guys, it was the version

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