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 inject look-back data to IBData ?

    General Code/Help
    1
    1
    44
    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.
    • P
      python-trader last edited by

      Greetings,

      I am planning to use backtrader for IB live trading.

      My strategy needs historical data upto 20 days ago (look-back) to start. simplified code in strategy looks like this:

      look_back = 20
      if len(data0 < look_back) :
         pass
      

      I am trying not to wait 20 days (leave backtraders running for 20 days) until my strategy start to trade.

      I do have historical data prior to live trade.

      Is there any way to pre-populate (inject) 20 days of OHLC data to IBData before I start bt.run() ?

      Thank you,

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