Adding the pair name when populating indicators allowing the strategy to have customized context for a pair

This commit is contained in:
Jean-Baptiste LE STANG
2018-01-30 15:03:38 +01:00
parent 5f86c389b0
commit 26e288e655
14 changed files with 46 additions and 46 deletions

View File

@@ -47,7 +47,7 @@ class TestStrategy(IStrategy):
# Optimal ticker interval for the strategy
ticker_interval = 5
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
def populate_indicators(self, dataframe: DataFrame, pair: str) -> DataFrame:
"""
Adds several different TA indicators to the given DataFrame
@@ -214,7 +214,7 @@ class TestStrategy(IStrategy):
return dataframe
def populate_buy_trend(self, dataframe: DataFrame) -> 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
@@ -230,7 +230,7 @@ class TestStrategy(IStrategy):
return dataframe
def populate_sell_trend(self, dataframe: DataFrame) -> 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