2021-06-08 19:04:34 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
2022-03-25 05:55:37 +00:00
|
|
|
class ExitType(Enum):
|
2021-06-08 19:04:34 +00:00
|
|
|
"""
|
2022-04-03 17:39:13 +00:00
|
|
|
Enum to distinguish between exit reasons
|
2021-06-08 19:04:34 +00:00
|
|
|
"""
|
|
|
|
ROI = "roi"
|
|
|
|
STOP_LOSS = "stop_loss"
|
|
|
|
STOPLOSS_ON_EXCHANGE = "stoploss_on_exchange"
|
|
|
|
TRAILING_STOP_LOSS = "trailing_stop_loss"
|
2022-07-28 18:35:23 +00:00
|
|
|
LIQUIDATION = "liquidation"
|
2022-04-04 15:10:02 +00:00
|
|
|
EXIT_SIGNAL = "exit_signal"
|
2022-04-04 14:59:27 +00:00
|
|
|
FORCE_EXIT = "force_exit"
|
2022-04-04 15:03:27 +00:00
|
|
|
EMERGENCY_EXIT = "emergency_exit"
|
2022-04-04 15:04:43 +00:00
|
|
|
CUSTOM_EXIT = "custom_exit"
|
2022-07-31 12:19:04 +00:00
|
|
|
PARTIAL_EXIT = "partial_exit"
|
2021-06-08 19:04:34 +00:00
|
|
|
NONE = ""
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
# explicitly convert to String to help with exporting data.
|
|
|
|
return self.value
|