Fixing wrong 'old dataframe detection mechanism' for long tickers( > 30 minutes)

This commit is contained in:
Jean-Baptiste LE STANG 2018-01-28 14:40:02 +01:00
parent 3b11459a38
commit cf4d25d547

View File

@ -112,7 +112,7 @@ def get_signal(pair: str, interval: int) -> (bool, bool):
# Check if dataframe is out of date
signal_date = arrow.get(latest['date'])
if signal_date < arrow.now() - timedelta(minutes=10):
if signal_date < arrow.now() - timedelta(minutes=(interval + 5)):
logger.warning('Too old dataframe for pair %s', pair)
return (False, False) # return False ?