We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5197b44 commit fbbb24aCopy full SHA for fbbb24a
backtesting/backtesting.py
@@ -718,7 +718,7 @@ def tp(self, price: float):
718
719
def __set_contingent(self, type, price):
720
assert type in ('sl', 'tp')
721
- assert price is None or 0 < price < np.inf
+ assert price is None or 0 < price < np.inf, f'Make sure 0 < price < inf! price: {price}'
722
attr = f'_{self.__class__.__qualname__}__{type}_order'
723
order: Order = getattr(self, attr)
724
if order:
0 commit comments