mirror of
https://github.com/kernc/backtesting.py.git
synced 2024-01-28 15:29:30 +03:00
BUG: Fix _Data.__repr__ to show current OHLC values
This commit is contained in:
@@ -136,7 +136,7 @@ class _Data:
|
||||
self.__arrays['__index'] = index
|
||||
|
||||
def __repr__(self):
|
||||
i = min(self.__i, len(self.__df) - 1)
|
||||
i = min(self.__i, len(self.__df)) - 1
|
||||
index = self.__arrays['__index'][i]
|
||||
items = ', '.join(f'{k}={v}' for k, v in self.__df.iloc[i].items())
|
||||
return f'<Data i={i} ({index}) {items}>'
|
||||
|
||||
Reference in New Issue
Block a user