For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

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

  • 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>  ...

  • administrators

    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 ...

  • 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).

Log in to reply

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.