Add tests for advise_indicator methods

This commit is contained in:
Matthias
2018-07-18 22:04:34 +02:00
parent 4ebd706cb8
commit aa772c28ad
3 changed files with 13 additions and 10 deletions

View File

@@ -28,7 +28,7 @@ class DefaultStrategy(IStrategy):
# Optimal ticker interval for the strategy
ticker_interval = '5m'
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
def advise_indicators(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Adds several different TA indicators to the given DataFrame
@@ -196,10 +196,11 @@ class DefaultStrategy(IStrategy):
return dataframe
def populate_buy_trend(self, dataframe: DataFrame) -> DataFrame:
def advise_buy(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Based on TA indicators, populates the buy signal for the given dataframe
:param dataframe: DataFrame
:param pair: Pair currently analyzed
:return: DataFrame with buy column
"""
dataframe.loc[
@@ -217,10 +218,11 @@ class DefaultStrategy(IStrategy):
return dataframe
def populate_sell_trend(self, dataframe: DataFrame) -> DataFrame:
def advise_sell(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Based on TA indicators, populates the sell signal for the given dataframe
:param dataframe: DataFrame
:param pair: Pair currently analyzed
:return: DataFrame with buy column
"""
dataframe.loc[