Added candle_type to a lot of methods, wrote some tests

This commit is contained in:
Sam Germain
2021-11-21 01:43:05 -06:00
parent e2f98a8dab
commit 920151934a
27 changed files with 495 additions and 253 deletions

View File

@@ -19,7 +19,7 @@ class InformativeDecoratorTest(IStrategy):
startup_candle_count: int = 20
def informative_pairs(self):
return [('BTC/USDT', '5m')]
return [('BTC/USDT', '5m', '')]
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['buy'] = 0
@@ -67,7 +67,7 @@ class InformativeDecoratorTest(IStrategy):
dataframe['rsi_less'] = dataframe['rsi'] < dataframe['rsi_1h']
# Mixing manual informative pairs with decorators.
informative = self.dp.get_pair_dataframe('BTC/USDT', '5m')
informative = self.dp.get_pair_dataframe('BTC/USDT', '5m', '')
informative['rsi'] = 14
dataframe = merge_informative_pair(dataframe, informative, self.timeframe, '5m', ffill=True)