emergency_sell -> emergency_exit
This commit is contained in:
@@ -11,7 +11,7 @@ class ExitType(Enum):
|
||||
TRAILING_STOP_LOSS = "trailing_stop_loss"
|
||||
SELL_SIGNAL = "sell_signal"
|
||||
FORCE_EXIT = "force_exit"
|
||||
EMERGENCY_SELL = "emergency_sell"
|
||||
EMERGENCY_EXIT = "emergency_exit"
|
||||
CUSTOM_SELL = "custom_sell"
|
||||
NONE = ""
|
||||
|
||||
|
@@ -981,7 +981,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
logger.error(f'Unable to place a stoploss order on exchange. {e}')
|
||||
logger.warning('Exiting the trade forcefully')
|
||||
self.execute_trade_exit(trade, trade.stop_loss, exit_check=ExitCheckTuple(
|
||||
exit_type=ExitType.EMERGENCY_SELL))
|
||||
exit_type=ExitType.EMERGENCY_EXIT))
|
||||
|
||||
except ExchangeError:
|
||||
trade.stoploss_order_id = None
|
||||
@@ -1162,7 +1162,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
try:
|
||||
self.execute_trade_exit(
|
||||
trade, order.get('price'),
|
||||
exit_check=ExitCheckTuple(exit_type=ExitType.EMERGENCY_SELL))
|
||||
exit_check=ExitCheckTuple(exit_type=ExitType.EMERGENCY_EXIT))
|
||||
except DependencyException as exception:
|
||||
logger.warning(
|
||||
f'Unable to emergency sell trade {trade.pair}: {exception}')
|
||||
@@ -1380,7 +1380,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
trade = self.cancel_stoploss_on_exchange(trade)
|
||||
|
||||
order_type = ordertype or self.strategy.order_types[exit_type]
|
||||
if exit_check.exit_type == ExitType.EMERGENCY_SELL:
|
||||
if exit_check.exit_type == ExitType.EMERGENCY_EXIT:
|
||||
# Emergency sells (default to market!)
|
||||
order_type = self.strategy.order_types.get("emergencyexit", "market")
|
||||
|
||||
|
@@ -770,7 +770,7 @@ class Telegram(RPCHandler):
|
||||
'stoploss_on_exchange': 'Stoploss',
|
||||
'sell_signal': 'Sell Signal',
|
||||
'force_exit': 'Force Exit',
|
||||
'emergency_sell': 'Emergency Sell',
|
||||
'emergency_exit': 'Emergency Exit',
|
||||
}
|
||||
exit_reasons_tabulate = [
|
||||
[
|
||||
|
@@ -308,7 +308,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
|
||||
:param exit_reason: Exit reason.
|
||||
Can be any of ['roi', 'stop_loss', 'stoploss_on_exchange', 'trailing_stop_loss',
|
||||
'sell_signal', 'force_exit', 'emergency_sell']
|
||||
'sell_signal', 'force_exit', 'emergency_exit']
|
||||
:param current_time: datetime object, containing the current datetime
|
||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||
:return bool: When True, then the exit-order is placed on the exchange.
|
||||
|
@@ -162,7 +162,7 @@ def confirm_trade_exit(self, pair: str, trade: 'Trade', order_type: str, amount:
|
||||
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
|
||||
:param exit_reason: Exit reason.
|
||||
Can be any of ['roi', 'stop_loss', 'stoploss_on_exchange', 'trailing_stop_loss',
|
||||
'sell_signal', 'force_exit', 'emergency_sell']
|
||||
'sell_signal', 'force_exit', 'emergency_exit']
|
||||
:param current_time: datetime object, containing the current datetime
|
||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||
:return bool: When True is returned, then the exit-order is placed on the exchange.
|
||||
|
Reference in New Issue
Block a user