Remove unused code on Strategy interface
This commit is contained in:
parent
9090715ae5
commit
9f8539f13e
@ -17,13 +17,6 @@ class IStrategy(ABC):
|
|||||||
stoploss -> float: optimal stoploss designed for the strategy
|
stoploss -> float: optimal stoploss designed for the strategy
|
||||||
ticker_interval -> int: value of the ticker interval to use for the strategy
|
ticker_interval -> int: value of the ticker interval to use for the strategy
|
||||||
"""
|
"""
|
||||||
@property
|
|
||||||
def name(self) -> str:
|
|
||||||
"""
|
|
||||||
Name of the strategy.
|
|
||||||
:return: str representation of the class name
|
|
||||||
"""
|
|
||||||
return self.__class__.__name__
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# pragma pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This module load custom strategies
|
This module load custom strategies
|
||||||
"""
|
"""
|
||||||
@ -21,7 +23,7 @@ class Strategy(object):
|
|||||||
|
|
||||||
DEFAULT_STRATEGY = 'default_strategy'
|
DEFAULT_STRATEGY = 'default_strategy'
|
||||||
|
|
||||||
def __new__(cls):
|
def __new__(cls) -> object:
|
||||||
"""
|
"""
|
||||||
Used to create the Singleton
|
Used to create the Singleton
|
||||||
:return: Strategy object
|
:return: Strategy object
|
||||||
@ -30,15 +32,7 @@ class Strategy(object):
|
|||||||
Strategy.__instance = object.__new__(cls)
|
Strategy.__instance = object.__new__(cls)
|
||||||
return Strategy.__instance
|
return Strategy.__instance
|
||||||
|
|
||||||
def __init__(self):
|
def init(self, config: dict) -> None:
|
||||||
if Strategy.__instance is None:
|
|
||||||
self.logger = None
|
|
||||||
self.minimal_roi = None
|
|
||||||
self.stoploss = None
|
|
||||||
self.ticker_interval = None
|
|
||||||
self.custom_strategy = None
|
|
||||||
|
|
||||||
def init(self, config):
|
|
||||||
"""
|
"""
|
||||||
Load the custom class from config parameter
|
Load the custom class from config parameter
|
||||||
:param config:
|
:param config:
|
||||||
|
Loading…
Reference in New Issue
Block a user