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

accessing current bar

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

  • administrators

  • @backtrader Thanks :)

Log in to reply