Use timeframe from within strategy

This commit is contained in:
Matthias
2020-06-02 09:36:04 +02:00
parent 388573800c
commit 947903a4ac
7 changed files with 20 additions and 18 deletions

View File

@@ -29,7 +29,7 @@ class DefaultStrategy(IStrategy):
stoploss = -0.10
# Optimal ticker interval for the strategy
ticker_interval = '5m'
timeframe = '5m'
# Optional order type mapping
order_types = {

View File

@@ -19,6 +19,7 @@ def test_default_strategy(result):
assert type(strategy.minimal_roi) is dict
assert type(strategy.stoploss) is float
assert type(strategy.ticker_interval) is str
assert type(strategy.timeframe) is str
indicators = strategy.populate_indicators(result, metadata)
assert type(indicators) is DataFrame
assert type(strategy.populate_buy_trend(indicators, metadata)) is DataFrame

View File

@@ -105,6 +105,7 @@ def test_strategy(result, default_conf):
assert strategy.stoploss == -0.10
assert default_conf['stoploss'] == -0.10
assert strategy.timeframe == '5m'
assert strategy.ticker_interval == '5m'
assert default_conf['timeframe'] == '5m'