Skip to content

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

Diff for: backtesting/_util.py

+1-1
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)