For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
replay H1 bar using M1 data and call function at new H1 bar
-
Hello!
I'm replaying H1 bar using M1 data:
cerebro.replaydata(data, timeframe=bt.TimeFrame.Minutes, compression=60)
When calling
next()
, the function runs at a new M1 bar, which is good.While I'm looking for a similar function, which is called at a new H1 bar - please kindly share your advise.
Thank you!
-
Maybe I have found the answer in the document:
"When a compressed bar is forming, the lengthlen(self)
of the strategy will remain unchanged."