Update some more sell_reason occurances
This commit is contained in:
@@ -41,16 +41,6 @@ class StoplossGuard(IProtection):
|
||||
Evaluate recent trades
|
||||
"""
|
||||
look_back_until = date_now - timedelta(minutes=self._lookback_period)
|
||||
# filters = [
|
||||
# Trade.is_open.is_(False),
|
||||
# Trade.close_date > look_back_until,
|
||||
# or_(Trade.sell_reason == ExitType.STOP_LOSS.value,
|
||||
# and_(Trade.sell_reason == ExitType.TRAILING_STOP_LOSS.value,
|
||||
# Trade.close_profit < 0))
|
||||
# ]
|
||||
# if pair:
|
||||
# filters.append(Trade.pair == pair)
|
||||
# trades = Trade.get_trades(filters).all()
|
||||
|
||||
trades1 = Trade.get_trades_proxy(pair=pair, is_open=False, close_date=look_back_until)
|
||||
trades = [trade for trade in trades1 if (str(trade.exit_reason) in (
|
||||
|
Reference in New Issue
Block a user