stable/freqtrade/enums/exitchecktuple.py

18 lines
423 B
Python
Raw Normal View History

2022-03-25 05:50:18 +00:00
from freqtrade.enums.selltype import SellType
class ExitCheckTuple:
"""
NamedTuple for Exit type + reason
"""
exit_type: SellType
exit_reason: str = ''
def __init__(self, exit_type: SellType, exit_reason: str = ''):
self.exit_type = exit_type
self.exit_reason = exit_reason or exit_type.value
@property
def exit_flag(self):
return self.exit_type != SellType.NONE