Update SellType to ExitType
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class SellType(Enum):
|
||||
class ExitType(Enum):
|
||||
"""
|
||||
Enum to distinguish between sell reasons
|
||||
"""
|
Reference in New Issue
Block a user