Move signalType to enums

This commit is contained in:
Matthias 2021-06-08 21:09:39 +02:00
parent 89b9915c12
commit 3c149b9b59
3 changed files with 11 additions and 9 deletions

View File

@ -1,2 +1,3 @@
# flake8: noqa: F401 # flake8: noqa: F401
from freqtrade.enums.selltype import SellType from freqtrade.enums.selltype import SellType
from freqtrade.enums.signaltype import SignalType

View File

@ -0,0 +1,9 @@
from enum import Enum
class SignalType(Enum):
"""
Enum to distinguish between buy and sell signals
"""
BUY = "buy"
SELL = "sell"

View File

@ -14,7 +14,7 @@ from pandas import DataFrame
from freqtrade.constants import ListPairsWithTimeframes from freqtrade.constants import ListPairsWithTimeframes
from freqtrade.data.dataprovider import DataProvider from freqtrade.data.dataprovider import DataProvider
from freqtrade.enums import SellType from freqtrade.enums import SellType, SignalType
from freqtrade.exceptions import OperationalException, StrategyError from freqtrade.exceptions import OperationalException, StrategyError
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_seconds from freqtrade.exchange import timeframe_to_minutes, timeframe_to_seconds
from freqtrade.exchange.exchange import timeframe_to_next_date from freqtrade.exchange.exchange import timeframe_to_next_date
@ -28,14 +28,6 @@ logger = logging.getLogger(__name__)
CUSTOM_SELL_MAX_LENGTH = 64 CUSTOM_SELL_MAX_LENGTH = 64
class SignalType(Enum):
"""
Enum to distinguish between buy and sell signals
"""
BUY = "buy"
SELL = "sell"
class SellCheckTuple(object): class SellCheckTuple(object):
""" """
NamedTuple for Sell type + reason NamedTuple for Sell type + reason