diff --git a/freqtrade/optimize/hyperopt_loss_interface.py b/freqtrade/optimize/hyperopt_loss_interface.py index 879a9f0e9..c2607a9a8 100644 --- a/freqtrade/optimize/hyperopt_loss_interface.py +++ b/freqtrade/optimize/hyperopt_loss_interface.py @@ -15,6 +15,7 @@ class IHyperOptLoss(ABC): Defines the custom loss function (`hyperopt_loss_function()` which is evaluated every epoch.) """ ticker_interval: str + timeframe: str @staticmethod @abstractmethod diff --git a/freqtrade/persistence.py b/freqtrade/persistence.py index 111ccfe2a..363ce35ad 100644 --- a/freqtrade/persistence.py +++ b/freqtrade/persistence.py @@ -288,6 +288,7 @@ class Trade(_DECL_BASE): 'max_rate': self.max_rate, 'strategy': self.strategy, 'ticker_interval': self.ticker_interval, + 'timeframe': self.ticker_interval, 'open_order_id': self.open_order_id, 'exchange': self.exchange, } diff --git a/tests/data/test_dataprovider.py b/tests/data/test_dataprovider.py index 718060c5e..def3ad535 100644 --- a/tests/data/test_dataprovider.py +++ b/tests/data/test_dataprovider.py @@ -104,7 +104,7 @@ def test_refresh(mocker, default_conf, ohlcv_history): timeframe = default_conf["timeframe"] pairs = [("XRP/BTC", timeframe), ("UNITTEST/BTC", timeframe)] - pairs_non_trad = [("ETH/USDT", ticker_interval), ("BTC/TUSD", "1h")] + pairs_non_trad = [("ETH/USDT", timeframe), ("BTC/TUSD", "1h")] dp = DataProvider(default_conf, exchange) dp.refresh(pairs) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 8e79f4297..1ed97f728 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -87,7 +87,7 @@ def test_load_config_file_error_range(default_conf, mocker, caplog) -> None: assert isinstance(x, str) assert (x == '{"max_open_trades": 1, "stake_currency": "BTC", ' '"stake_amount": .001, "fiat_display_currency": "USD", ' - '"timeframe": "5m", "dry_run": true, ') + '"timeframe": "5m", "dry_run": true, "cance') def test__args_to_config(caplog):