DrawDown Analyzer Error



  • 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



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


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

    and got the same error.



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


  • administrators

    @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)



  • Thanks guys, it was the version


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.