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/

    IB data close price for different time-frame

    General Discussion
    1
    1
    47
    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.
    • Ari Wahyudi 0
      Ari Wahyudi 0 last edited by

      Hi,
      I'm new to backtrader and been tested the IB sample code. What I did is just to print the OHLC price from IB.
      It looks to me the close prices are not the same for at a specific time, if the price is taken using different time-frame.

      For instance, here's the prices (OHLC) taken using different time frame.

      1 minute time frame:
      2020-09-20 21:16:00, 1.2922, 1.29235, 1.2921, 1.29226
      2020-09-20 21:17:00, 1.29226, 1.2925, 1.29204, 1.2925
      2020-09-20 21:18:00, 1.2925, 1.2927, 1.2925, 1.2925

      15 seconds time-frame
      2020-09-20 21:16:45, 1.2922, 1.29235, 1.2921, 1.29226
      2020-09-20 21:17:00, 1.29226, 1.29229, 1.29204, 1.29229 2020-09-20 21:17:15, 1.29229, 1.29229, 1.29228, 1.29228

      The close prices at exact same time (21:17:00) are not the same for the data taken with 15 seconds and 1 minutes time-frame.
      Is it an expected behavior?

      Thanks.

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