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 per trade in def notify_trade():

    General Code/Help
    drawdown per trade
    2
    2
    800
    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.
    • B
      blonc last edited by

      is there a way to get drawdown per trade already written up? I know you can get drawdown in the observer but thats more for plotting. I know you can get drawdown in the analyzer as well but that seems to just be the max drawdown. Thanks

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

        @blonc said in drawdown per trade in def notify_trade()::

        I know you can get drawdown in the analyzer as wellbut that seems to just be the max drawdown

        Wrong knowledge then. Docs - Analyzers

        Quoting from the DrawDown docs:

            Methods:
        
              - ``get_analysis``
        
                Returns a dictionary (with . notation support and subdctionaries) with
                drawdown stats as values, the following keys/attributes are available:
        
                - ``drawdown`` - drawdown value in 0.xx %
                - ``moneydown`` - drawdown value in monetary units
                - ``len`` - drawdown length
        
                - ``max.drawdown`` - max drawdown value in 0.xx %
                - ``max.moneydown`` - max drawdown value in monetary units
                - ``max.len`` - max drawdown length
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors