Simplify strategy interface by removing explicit self.freqai_info assignment
This commit is contained in:
parent
3b827ee60a
commit
3918f4abbd
@ -401,8 +401,6 @@ The FreqAI strategy requires the user to include the following lines of code in
|
|||||||
|
|
||||||
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
|
||||||
self.freqai_info = self.config["freqai"]
|
|
||||||
|
|
||||||
# All indicators must be populated by populate_any_indicators() for live functionality
|
# All indicators must be populated by populate_any_indicators() for live functionality
|
||||||
# to work correctly.
|
# to work correctly.
|
||||||
|
|
||||||
|
@ -151,6 +151,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
from freqtrade.resolvers.freqaimodel_resolver import FreqaiModelResolver
|
from freqtrade.resolvers.freqaimodel_resolver import FreqaiModelResolver
|
||||||
|
|
||||||
self.freqai = FreqaiModelResolver.load_freqaimodel(self.config)
|
self.freqai = FreqaiModelResolver.load_freqaimodel(self.config)
|
||||||
|
self.freqai_info = self.config["freqai"]
|
||||||
|
|
||||||
def ft_bot_start(self, **kwargs) -> None:
|
def ft_bot_start(self, **kwargs) -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -180,8 +180,6 @@ class FreqaiExampleStrategy(IStrategy):
|
|||||||
|
|
||||||
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
|
||||||
self.freqai_info = self.config["freqai"]
|
|
||||||
|
|
||||||
# All indicators must be populated by populate_any_indicators() for live functionality
|
# All indicators must be populated by populate_any_indicators() for live functionality
|
||||||
# to work correctly.
|
# to work correctly.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user