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 get the index of the current iteration in next?
-
Hello,
I am very new to Backtrader, hence I have a pretty simple question.
I understand you use self.data.low[0] to get let's say the low value of the current iteration, as 0 is the index by which you access the current data.
But how do you the index of the current iteration? Let's say you are at the 100th example in the time-series. Where do you access this value?
Best Regards,
Borut
-
@borutf You can get the current bar but using
len(self)
-
@run-out said in How to get the index of the current iteration in next?:
@borutf You can get the current bar but using
len(self)
Thanks.