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/

    Plotting time tick labels

    General Code/Help
    2
    5
    509
    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.
    • R
      rluc99 last edited by

      Is it possible to plot time tick labels (for intra-day data). I have loaded a file containing a single day of minute data, but no labels appear on the x-axis. The cursor is also not picking up any minute data (only the day).
      I have checked that the file is being read in correctly and the hour/minute/second parameters are being updated on each bar.

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

        • https://community.backtrader.com/topic/2016/basic-plotting-no-x-axis/
        • https://community.backtrader.com/topic/1996/how-can-i-show-datetime-rather-than-just-date-in-x-value-in-plot/
        R 1 Reply Last reply Reply Quote 0
        • R
          rluc99 @backtrader last edited by

          @backtrader Thanks for your rapid reply:
          *It is not the matplotlib version problem (I was the one who sent that original post and have changed matplotlib so that it now prints out x axis)
          *It is not fmt_x_ticks or fmt_x_data (your other suggestion).
          I have three days of minute data. I get plots of the daily ticks and labels, but not the minute ticks and labels. I have realized that although the data is being read in for some reason time is converted to end of session time (ie 23:59) on all intraday minute bars. Hopefully the screen shot below illustrates:
          Capture.JPG

          I think I may be misunderstanding how to

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

            • https://community.backtrader.com/topic/381/faq (timeframe/compression)
            R 1 Reply Last reply Reply Quote 0
            • R
              rluc99 @backtrader last edited by

              @backtrader once again - thanks for the rapid response. This suggestion fixed it!
              timeframe=bt.TimeFrame.Minutes
              ...also discovered reference to this can be found in "Data Feeds"!
              The documentation is excellent, the reader is flawed!!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
              $(document).ready(function () { app.coldLoad(); }); }