overload populate_indicators to work with and without pair argumen

all while not breaking users strategies
This commit is contained in:
Matthias
2018-07-22 17:39:35 +02:00
parent 98665dcef4
commit f286ba6b87
5 changed files with 82 additions and 65 deletions

View File

@@ -44,7 +44,7 @@ class TestStrategy(IStrategy):
# Optimal ticker interval for the strategy
ticker_interval = '5m'
def advise_indicators(self, dataframe: DataFrame, pair: str) -> DataFrame:
def populate_indicators(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Adds several different TA indicators to the given DataFrame
@@ -211,7 +211,7 @@ class TestStrategy(IStrategy):
return dataframe
def advise_buy(self, dataframe: DataFrame, pair: str) -> DataFrame:
def populate_buy_trend(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Based on TA indicators, populates the buy signal for the given dataframe
:param dataframe: DataFrame populated with indicators
@@ -228,7 +228,7 @@ class TestStrategy(IStrategy):
return dataframe
def advise_sell(self, dataframe: DataFrame, pair: str) -> DataFrame:
def populate_sell_trend(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Based on TA indicators, populates the sell signal for the given dataframe
:param dataframe: DataFrame populated with indicators