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/

    InteractiveBrokers: No error, bar from the future, and exit

    General Discussion
    2
    3
    611
    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.
    • ?
      A Former User last edited by

      Just noticed some odd behaviour running in real time. The first date/time is the local date time (17:43:57), the second date time with the line MyStrategy is the bar time. Notice that I get the bar for 1pm (13:00) at 17:43:57 GMT. After this, backtrader exits. There was no disconnect (I received no data notifications), it just quit. It was a clean quit, but no idea why. Is there any way to know why this is happening, should it happen again?

      2018-02-20 17:43:57,183;DEBUG;<tickPrice tickerId=16777217, field=2, price=1.26221, canAutoExecute=1>
      2018-02-20 17:43:57,184;DEBUG;<tickSize tickerId=16777217, field=3, size=2000000>
      2018-02-20 17:43:57,184;DEBUG;<tickSize tickerId=16777217, field=3, size=2000000>
      2018-02-20 17:43:57,185;DEBUG;<tickPrice tickerId=16777220, field=2, price=1.26221, canAutoExecute=1>
      2018-02-20 17:43:57,185;DEBUG;<tickSize tickerId=16777220, field=3, size=2000000>
      2018-02-20 17:43:57,186;DEBUG;<tickSize tickerId=16777220, field=3, size=2000000>
      2018-02-20 17:43:57,216;DEBUG;<tickPrice tickerId=16777219, field=1, price=1.26217, canAutoExecute=1>
      2018-02-20 17:43:57,217;DEBUG;<tickSize tickerId=16777219, field=0, size=2000000>
      2018-02-20 17:43:57,221;DEBUG;<tickSize tickerId=16777219, field=0, size=2000000>
      2018-02-20 17:43:57,222;DEBUG;<tickPrice tickerId=16777217, field=1, price=1.26217, canAutoExecute=1>
      2018-02-20 17:43:57,222;DEBUG;<tickSize tickerId=16777217, field=0, size=2000000>
      2018-02-20 17:43:57,223;DEBUG;<tickSize tickerId=16777217, field=0, size=2000000>
      2018-02-20 17:43:57,223;DEBUG;<tickPrice tickerId=16777220, field=1, price=1.26217, canAutoExecute=1>
      2018-02-20 17:43:57,224;DEBUG;<tickSize tickerId=16777220, field=0, size=2000000>
      2018-02-20 17:43:57,226;DEBUG;2018-02-20 13:00:00 #<MyStrategy>  ...
      
      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        Not enough info (at least for this brain) to really understand the setup. It seems like you might be working with assets which are outside of your timezone. Is that the case? Are timezones provided to the data feed?

        Just trying to look into how it looks like and what could have gone wrong ...

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User last edited by

          Correct. The machine and the Interactive Brokers gateway are running in a different timezone (GMT) from the asset. I will try and make them match and see if that provides any improvement (it just happened again, near the end of today's session).

          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(); }); }