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/

    accessing current bar

    General Code/Help
    2
    3
    735
    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,

      If I got it correctly, the strategy receives a new candle after it closes. I have a problem regarding this situation. Let's assume I am doing live trading and receiving tick data. I resample ticks to 60 Minutes. And there is an indicator (let's say BollingerBands) on 60 Minutes data.

      After the last bar closes I keep getting new tick data, would it be possible to make use of the tick data and assume that the current 60 Minute bar closes at the last tick data before the 60 Minutes time runs up for that candle?

      This way I would be able to make live decision based on current price based on tick data and indicator which takes current close into consideration.

      Thank you in advance.

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by backtrader

        See: Docs - Data Replay

        bb2 1 Reply Last reply Reply Quote 0
        • bb2
          bb2 @backtrader last edited by

          @backtrader Thanks :)

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