Fix conflicts

This commit is contained in:
Anton 2018-05-04 13:38:51 +03:00
parent ceeb98dda9
commit 2bfce64e6a
4 changed files with 9 additions and 19 deletions

View File

@ -8,8 +8,7 @@ from datetime import datetime
import ccxt import ccxt
import arrow import arrow
from freqtrade import OperationalException, DependencyException, TemporaryError from freqtrade import constants, OperationalException, DependencyException, TemporaryError
from freqtrade.constants import Constants
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -283,7 +282,7 @@ def get_ticker_history(pair: str, tick_interval: str, since_ms: Optional[int] =
try: try:
# last item should be in the time interval [now - tick_interval, now] # last item should be in the time interval [now - tick_interval, now]
till_time_ms = arrow.utcnow().shift( till_time_ms = arrow.utcnow().shift(
minutes=-Constants.TICKER_INTERVAL_MINUTES[tick_interval] minutes=-constants.TICKER_INTERVAL_MINUTES[tick_interval]
).timestamp * 1000 ).timestamp * 1000
# it looks as if some exchanges return cached data # it looks as if some exchanges return cached data
# and they update it one in several minute, so 10 mins interval # and they update it one in several minute, so 10 mins interval

View File

@ -7,9 +7,8 @@ import os
import arrow import arrow
from typing import Optional, List, Dict, Tuple from typing import Optional, List, Dict, Tuple
from freqtrade import misc from freqtrade import misc, constants
from freqtrade.exchange import get_ticker_history from freqtrade.exchange import get_ticker_history
from freqtrade.constants import Constants
from user_data.hyperopt_conf import hyperopt_optimize_conf from user_data.hyperopt_conf import hyperopt_optimize_conf
@ -156,7 +155,7 @@ def load_cached_data_for_updating(filename: str,
if timerange[0][0] == 'date': if timerange[0][0] == 'date':
since_ms = timerange[1] * 1000 since_ms = timerange[1] * 1000
elif timerange[0][1] == 'line': elif timerange[0][1] == 'line':
num_minutes = timerange[2] * Constants.TICKER_INTERVAL_MINUTES[tick_interval] num_minutes = timerange[2] * constants.TICKER_INTERVAL_MINUTES[tick_interval]
since_ms = arrow.utcnow().shift(minutes=num_minutes).timestamp * 1000 since_ms = arrow.utcnow().shift(minutes=num_minutes).timestamp * 1000
# read the cached file # read the cached file

View File

@ -21,9 +21,8 @@ from typing import List, Dict
import gzip import gzip
from freqtrade.arguments import Arguments from freqtrade.arguments import Arguments
from freqtrade import misc from freqtrade import misc, constants
from pandas import DataFrame from pandas import DataFrame
from freqtrade.constants import Constants
import dateutil.parser import dateutil.parser
@ -139,7 +138,7 @@ def convert_main(args: Namespace) -> None:
# default to adding 'm' to end of minutes for new interval name # default to adding 'm' to end of minutes for new interval name
interval = str(minutes) + 'm' interval = str(minutes) + 'm'
# but check if there is a mapping between int and string also # but check if there is a mapping between int and string also
for str_interval, minutes_interval in Constants.TICKER_INTERVAL_MINUTES.items(): for str_interval, minutes_interval in constants.TICKER_INTERVAL_MINUTES.items():
if minutes_interval == minutes: if minutes_interval == minutes:
interval = str_interval interval = str_interval
break break

View File

@ -24,21 +24,14 @@ import plotly.graph_objs as go
from freqtrade.arguments import Arguments from freqtrade.arguments import Arguments
from freqtrade.configuration import Configuration from freqtrade.configuration import Configuration
from freqtrade.analyze import Analyze from freqtrade.analyze import Analyze
<<<<<<< HEAD from freqtradeimport constants
from freqtrade.constants import Constants
=======
>>>>>>> bddf009a2b6d0e1a19cca558887ce972e99a6238
import freqtrade.optimize as optimize import freqtrade.optimize as optimize
import freqtrade.misc as misc import freqtrade.misc as misc
<<<<<<< HEAD
logger = logging.getLogger('freqtrade')
=======
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
>>>>>>> bddf009a2b6d0e1a19cca558887ce972e99a6238
# data:: [ pair, profit-%, enter, exit, time, duration] # data:: [ pair, profit-%, enter, exit, time, duration]
# data:: ["ETH/BTC", 0.0023975, "1515598200", "1515602100", "2018-01-10 07:30:00+00:00", 65] # data:: ["ETH/BTC", 0.0023975, "1515598200", "1515602100", "2018-01-10 07:30:00+00:00", 65]
@ -198,7 +191,7 @@ def define_index(min_date: int, max_date: int, interval: str) -> int:
""" """
Return the index of a specific date Return the index of a specific date
""" """
interval_minutes = Constants.TICKER_INTERVAL_MINUTES[interval] interval_minutes = constants.TICKER_INTERVAL_MINUTES[interval]
return int((max_date - min_date) / (interval_minutes * 60)) return int((max_date - min_date) / (interval_minutes * 60))