Backtrader Community

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

    Number of decimals in plot axes / data labels

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

      Hello, I've been learning backtrader for a couple of days. It seems it is going to be a powerful tool in my work.

      However I couldn't find a way of changing decimals to show on the plot axes. I'm building a strategy based on EURUSD exchange. I need 4 decimals and the default is 2. The same for the last data value on the labels.

      Please help.

      C 1 Reply Last reply Reply Quote 0
      • C
        CDubya @B2a1l2l2e2n4a last edited by

        @b2a1l2l2e2n4a

        I would think that if you sent 4 decimals INTO Bactrader it would remain like that.

        so it does not?

        B 1 Reply Last reply Reply Quote 0
        • B
          B2a1l2l2e2n4a @CDubya last edited by

          @cdubya

          The data keeps the 4 decimals but not the plot by default.

          In[4] cerebro.datas[0].close[0]
          In[5] 1.00898
          In[6] cerebro.plot()
          

          Figure_0.png

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