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/

    showing only specific orders on the plot

    General Code/Help
    2
    4
    581
    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.
    • S
      siavash last edited by

      How can I show only specific bracket orders( having specified condition in the code) on the plot? For example, showing only bracket orders having positive result.

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

        You would have to code an Observer which only pays attention to specific orders.

        It's not something which is a builtin in backtrader

        1 Reply Last reply Reply Quote 0
        • S
          siavash last edited by

          Thanks for you reply.
          I know that I should implement this by using observer class, but i don't know how.
          I want to plot only buy/sell pairs that those corresponding trade is positive.

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

            Your best bet is to look at the source of the Trades observer and only plot the trades of your choosing.

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