From 9f573481a87460ea3907649042a61f046c940bae Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Tue, 26 May 2020 13:54:45 +0300 Subject: [PATCH 1/2] Fix #3378 --- freqtrade/strategy/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 94a90e5d1..eff4f3b32 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -327,6 +327,7 @@ class IStrategy(ABC): latest_date = dataframe['date'].max() latest = dataframe.loc[dataframe['date'] == latest_date].iloc[-1] + latest_date = arrow.get(latest_date) # Check if dataframe is out of date interval_minutes = timeframe_to_minutes(interval) From 27e0c2604cd5f89ae648dfae4f04c1c345d9adb8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 26 May 2020 16:58:29 +0200 Subject: [PATCH 2/2] Add comment to ensure we're not accidentally removing this again --- freqtrade/strategy/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index eff4f3b32..400997baf 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -327,6 +327,7 @@ class IStrategy(ABC): latest_date = dataframe['date'].max() latest = dataframe.loc[dataframe['date'] == latest_date].iloc[-1] + # Explicitly convert to arrow object to ensure the below comparison does not fail latest_date = arrow.get(latest_date) # Check if dataframe is out of date