access self.data.i ? #812
traderblakeq
started this conversation in
General
Replies: 1 comment 2 replies
-
backtesting.py/backtesting/_util.py Lines 138 to 142 in 65f54f6 Hint: As
i = len(self.data)
cur_value = self.data.Close[i]
values_slice = self.data.Close[i - 5:i]
values_slice_series = self.data.Close.s.iloc[i - 5:i] |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
<Data i=86 (2017-08-18 01:30:00) Open=296.19, High=305.55, Low=296.19, Close=305.55, Volume=117.10346, Close_time=2017-08-18 01:45:00, Supertrend=False, Lowerband=277.04990005003623, Upperband=316.8900999499638>
How do I access i=86
have tried self.data.i --> does not exist & self.data.index is Timestamp.
2nd question:
I need to slice out from i=n to i=n
Any suggestion on how I could slice out from self.data - I guess it does not have the .loc
Beta Was this translation helpful? Give feedback.
All reactions