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/

    Uncoverted data remains error.

    General Code/Help
    2
    2
    138
    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.
    • D
      deltahedge last edited by

          data = bt.feeds.GenericCSVData(
              dataname = 'ES.csv',
              # Do not pass values before this date
              fromdate = datetime.datetime(2021, 3, 12),
              # Do not pass values before this date
              todate=datetime.datetime(2021, 3, 23),
              # Do not pass values after this date
              reverse=False,
              nullvalue=0.0,
              dtformat=('%m/%d/%Y'),
              tmformat=('%H:%M:%s'),
              datetime=0,
              high=2,
              low=3,
              open=1,
              close=4,
              volume=5,
              )
      

      I get the error: "ValueError: unconverted data remains: 0:00". Any help is appreciated, thanks.

      R 1 Reply Last reply Reply Quote -1
      • R
        rajanprabu @deltahedge last edited by

        @deltahedge

        its hard to answer without seeing the csv file. Possibly you may have timezone information along with time. If this doesn't work, please post few lines of csv.

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