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/

    Plot Backtesting Results in Multiple Graphs

    General Code/Help
    2
    4
    1332
    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
      chaT123 last edited by

      How can I plot broker.value in one graph object while rest backtesting results in a separate graph object? Plotting everything together in one graph makes the details very small to see.

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

        It's not a built-in functionality. You could try something like this (never tried)

        • Set plotinfo.plot = False for all data feeds (easy and quick in a for loop)
        • use then cerebro.plot() which won't plot neither the data feeds nor the associated indicators

        There should be no problem in invoking cerebro.plot() multiple times, so you can do it once with the data feeds plotted and once without.

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

          Thank you very much. Just to check, where should I use the plotinfo.plot = False? In the "def init(self):" inside the Strategy Class?

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

            @chat123 said in Plot Backtesting Results in Multiple Graphs:

            where should I use the plotinfo.plot = False? In the "def init(self):" inside the Strategy Class?

            You may do it there or when creating the data feeds.

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