We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 092a9ff commit 75fb2a0Copy full SHA for 75fb2a0
freqtrade/strategy/interface.py
@@ -1160,8 +1160,12 @@ def get_latest_candle(
1160
logger.warning(f"Empty candle (OHLCV) data for pair {pair}")
1161
return None, None
1162
1163
- latest_date_pd = dataframe["date"].max()
1164
- latest = dataframe.loc[dataframe["date"] == latest_date_pd].iloc[-1]
+ try:
+ latest_date_pd = dataframe["date"].max()
1165
+ latest = dataframe.loc[dataframe["date"] == latest_date_pd].iloc[-1]
1166
+ except Exception as e:
1167
+ logger.warning(f"Unable to get latest candle (OHLCV) data for pair {pair} - {e}")
1168
+ return None, None
1169
# Explicitly convert to datetime object to ensure the below comparison does not fail
1170
latest_date: datetime = latest_date_pd.to_pydatetime()
1171
0 commit comments