Correct imports and calls to parse_timerange
This commit is contained in:
@@ -12,7 +12,7 @@ from typing import Any, Dict, List, NamedTuple, Optional
|
||||
from pandas import DataFrame
|
||||
|
||||
from freqtrade import OperationalException
|
||||
from freqtrade.configuration import Arguments
|
||||
from freqtrade.configuration import TimeRange
|
||||
from freqtrade.data import history
|
||||
from freqtrade.data.dataprovider import DataProvider
|
||||
from freqtrade.exchange import timeframe_to_minutes
|
||||
@@ -404,7 +404,7 @@ class Backtesting(object):
|
||||
logger.info('Using stake_currency: %s ...', self.config['stake_currency'])
|
||||
logger.info('Using stake_amount: %s ...', self.config['stake_amount'])
|
||||
|
||||
timerange = Arguments.parse_timerange(None if self.config.get(
|
||||
timerange = TimeRange.parse_timerange(None if self.config.get(
|
||||
'timerange') is None else str(self.config.get('timerange')))
|
||||
data = history.load_data(
|
||||
datadir=Path(self.config['datadir']) if self.config.get('datadir') else None,
|
||||
|
@@ -9,7 +9,7 @@ from tabulate import tabulate
|
||||
from freqtrade import constants
|
||||
from freqtrade.edge import Edge
|
||||
|
||||
from freqtrade.configuration import Arguments
|
||||
from freqtrade.configuration import TimeRange
|
||||
from freqtrade.exchange import Exchange
|
||||
from freqtrade.resolvers import StrategyResolver
|
||||
|
||||
@@ -41,7 +41,7 @@ class EdgeCli(object):
|
||||
self.edge = Edge(config, self.exchange, self.strategy)
|
||||
self.edge._refresh_pairs = self.config.get('refresh_pairs', False)
|
||||
|
||||
self.timerange = Arguments.parse_timerange(None if self.config.get(
|
||||
self.timerange = TimeRange.parse_timerange(None if self.config.get(
|
||||
'timerange') is None else str(self.config.get('timerange')))
|
||||
|
||||
self.edge._timerange = self.timerange
|
||||
|
@@ -20,7 +20,7 @@ from pandas import DataFrame
|
||||
from skopt import Optimizer
|
||||
from skopt.space import Dimension
|
||||
|
||||
from freqtrade.configuration import Arguments
|
||||
from freqtrade.configuration import TimeRange
|
||||
from freqtrade.data.history import load_data, get_timeframe
|
||||
from freqtrade.optimize.backtesting import Backtesting
|
||||
# Import IHyperOptLoss to allow users import from this file
|
||||
@@ -310,7 +310,7 @@ class Hyperopt(Backtesting):
|
||||
)
|
||||
|
||||
def start(self) -> None:
|
||||
timerange = Arguments.parse_timerange(None if self.config.get(
|
||||
timerange = TimeRange.parse_timerange(None if self.config.get(
|
||||
'timerange') is None else str(self.config.get('timerange')))
|
||||
data = load_data(
|
||||
datadir=Path(self.config['datadir']) if self.config.get('datadir') else None,
|
||||
|
Reference in New Issue
Block a user