get rid of TICKER_INTERVAL_MINUTES dict, use ccxt's parse_timeframe() instead

This commit is contained in:
hroff-1902
2019-04-04 20:56:40 +03:00
parent 75c522e082
commit 2aa1b43f01
11 changed files with 52 additions and 42 deletions

View File

@@ -12,8 +12,8 @@ import warnings
import arrow
from pandas import DataFrame
from freqtrade import constants
from freqtrade.data.dataprovider import DataProvider
from freqtrade.misc import timeframe_to_minutes
from freqtrade.persistence import Trade
from freqtrade.wallets import Wallets
@@ -221,7 +221,7 @@ class IStrategy(ABC):
# Check if dataframe is out of date
signal_date = arrow.get(latest['date'])
interval_minutes = constants.TICKER_INTERVAL_MINUTES[interval]
interval_minutes = timeframe_to_minutes(interval)
offset = self.config.get('exchange', {}).get('outdated_offset', 5)
if signal_date < (arrow.utcnow().shift(minutes=-(interval_minutes * 2 + offset))):
logger.warning(