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/

    unexpected behaviour of notify_store / notify_data when IB's reconnect = -1

    General Code/Help
    1
    1
    389
    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.
    • bb2
      bb2 last edited by bb2

      Hello,

      I am experiencing connectivity issues when I use reconnect=-1 for IBStore.

      Scenario:

      1- Run IB gateway
      2- Run code below
      3- Let bt run for a while to start getting LIVE data
      4- Quit IB gateway
      5- Let bt run for a while.
      6- Re-run IB gateway

      What happens:

      After quitting IB gateway, notify_data triggers too late. In the log below you can see the last timestamp before quitting was 08:30:30 and CONNBROKEN arrives at 08:32:52 ( 08:32:52 is roughly the time I re-run IB gateway). In addition CONNBROKEN shows up only for one (not always the first one, i tested a few times) of the datas.

      After re-running IB gateway, connection is established and DELAYED state is assured only for the data with CONNBROKEN status above. The other datas do not get into DELAYED state, thus miss some historical data.

      Here you can find the code:
      https://gist.github.com/eduedix/d2e98df7e60f12d2574cbe917e495f3d

      Here are the logs:
      https://gist.github.com/eduedix/50a73b3e593579ea1b94df3f0314e9fe

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