Update SellType to ExitType

This commit is contained in:
Matthias
2022-03-25 06:55:37 +01:00
parent c07883b1f9
commit dcfa3e8648
24 changed files with 226 additions and 226 deletions

View File

@@ -2,11 +2,11 @@
from freqtrade.enums.backteststate import BacktestState
from freqtrade.enums.candletype import CandleType
from freqtrade.enums.exitchecktuple import ExitCheckTuple
from freqtrade.enums.exittype import ExitType
from freqtrade.enums.marginmode import MarginMode
from freqtrade.enums.ordertypevalue import OrderTypeValues
from freqtrade.enums.rpcmessagetype import RPCMessageType
from freqtrade.enums.runmode import NON_UTIL_MODES, OPTIMIZE_MODES, TRADING_MODES, RunMode
from freqtrade.enums.selltype import SellType
from freqtrade.enums.signaltype import SignalDirection, SignalTagType, SignalType
from freqtrade.enums.state import State
from freqtrade.enums.tradingmode import TradingMode

View File

@@ -1,17 +1,17 @@
from freqtrade.enums.selltype import SellType
from freqtrade.enums.exittype import ExitType
class ExitCheckTuple:
"""
NamedTuple for Exit type + reason
"""
exit_type: SellType
exit_type: ExitType
exit_reason: str = ''
def __init__(self, exit_type: SellType, exit_reason: str = ''):
def __init__(self, exit_type: ExitType, 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
return self.exit_type != ExitType.NONE

View File

@@ -1,7 +1,7 @@
from enum import Enum
class SellType(Enum):
class ExitType(Enum):
"""
Enum to distinguish between sell reasons
"""