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/

    How to get the OHLCV bar data for specific Datetime (forexample:2021-02-21 15:00:23)?

    General Code/Help
    1
    1
    63
    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
      shaodaodao last edited by

      Hi,
      I am using backtrader and bt-ccxt-store for living trading test.
      I am wondering is there a way to fetch a ohlcv bar for a specific datetime?

      During live trading, each time the internet connection fails, I lost all the previous info.
      So I fetched the latestest order data for records and start from there. The latest order has a timestamp, and I want to fetch the OHLCV bar (for example 15min) that timestamp followed in. However, I don't know how to extract the data...... Seems "loc" could not be applied because --- Finished with error: 'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute 'loc'

      Much appreciate if anyone could help.

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