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/

    About Commission

    General Code/Help
    2
    3
    350
    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
      barton05 last edited by

      Hi Admin,

      I would like to get an analyzer to get overall commission in the strategy.
      Tried to look into internet and manual but no luck, nearest one i find is the get_analysis but seems it does not provide such info. Not sure anyway i can do it?

      1 Reply Last reply Reply Quote 0
      • Robin Dhillon
        Robin Dhillon last edited by

        You could use the order.executed.comm to retrieve the commissions and run a function to add all of them and give you a total. I do recommend reading the order and trade documentation.

        1 Reply Last reply Reply Quote 1
        • B
          barton05 last edited by

          @robin-dhillon said in About Commission:

          order.executed.comm

          Thanks Robin, I did some further studies on how to store the commission info. Turns out the easiest way is to use notify_trade nicely.

          https://community.backtrader.com/topic/950/print-trade-simple-question/11

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors