Use timeframe from within strategy
This commit is contained in:
@@ -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 = {
|
||||
|
@@ -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
|
||||
|
@@ -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'
|
||||
|
||||
|
Reference in New Issue
Block a user