Move ExitCheckTuple to enums
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# flake8: noqa: F401
|
||||
from freqtrade.enums.backteststate import BacktestState
|
||||
from freqtrade.enums.candletype import CandleType
|
||||
from freqtrade.enums.exitchecktuple import ExitCheckTuple
|
||||
from freqtrade.enums.marginmode import MarginMode
|
||||
from freqtrade.enums.ordertypevalue import OrderTypeValues
|
||||
from freqtrade.enums.rpcmessagetype import RPCMessageType
|
||||
|
17
freqtrade/enums/exitchecktuple.py
Normal file
17
freqtrade/enums/exitchecktuple.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
Reference in New Issue
Block a user