Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c12381

Browse files
committed
BUG: Fix _Data.__repr__ to show current OHLC values
1 parent dfba461 commit 1c12381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎backtesting/_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _update(self):
136136
self.__arrays['__index'] = index
137137

138138
def __repr__(self):
139-
i = min(self.__i, len(self.__df) - 1)
139+
i = min(self.__i, len(self.__df)) - 1
140140
index = self.__arrays['__index'][i]
141141
items = ', '.join(f'{k}={v}' for k, v in self.__df.iloc[i].items())
142142
return f'<Data i={i} ({index}) {items}>'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /