Added more todos

This commit is contained in:
Sam Germain
2021-09-10 23:42:16 -06:00
parent 694460c8e0
commit 84c121652a
5 changed files with 6 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ class PrecisionFilter(IPairList):
pairlist_pos: int) -> None:
super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
# TODO-lev: Liquidation price?
if 'stoploss' not in self._config:
raise OperationalException(
'PrecisionFilter can only work with stoploss defined. Please add the '

View File

@@ -36,6 +36,7 @@ class MaxDrawdown(IProtection):
"""
LockReason to use
"""
# TODO-lev: < for shorts?
return (f'{drawdown} > {self._max_allowed_drawdown} in {self.lookback_period_str}, '
f'locking for {self.stop_duration_str}.')

View File

@@ -32,6 +32,7 @@ class StoplossGuard(IProtection):
def _reason(self) -> str:
"""
LockReason to use
#TODO-lev: check if min is the right word for shorts
"""
return (f'{self._trade_limit} stoplosses in {self._lookback_period} min, '
f'locking for {self._stop_duration} min.')
@@ -51,6 +52,7 @@ class StoplossGuard(IProtection):
# if pair:
# filters.append(Trade.pair == pair)
# trades = Trade.get_trades(filters).all()
# TODO-lev: Liquidation price?
trades1 = Trade.get_trades_proxy(pair=pair, is_open=False, close_date=look_back_until)
trades = [trade for trade in trades1 if (str(trade.sell_reason) in (