From 702ac14f2769d401ed9b7b93f6bec2ac61df6da5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 15 May 2024 06:57:28 +0200 Subject: [PATCH] Fix using wrong type --- freqtrade/data/metrics.py | 4 ++-- freqtrade/rpc/rpc.py | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/freqtrade/data/metrics.py b/freqtrade/data/metrics.py index 83c30bb68..2e4673fb5 100644 --- a/freqtrade/data/metrics.py +++ b/freqtrade/data/metrics.py @@ -164,8 +164,8 @@ def calculate_underwater( @dataclass() class DrawDownResult: drawdown_abs: float = 0.0 - high_date: datetime = None - low_date: datetime = None + high_date: pd.Timestamp = None + low_date: pd.Timestamp = None high_value: float = 0.0 low_value: float = 0.0 relative_account_drawdown: float = 0.0 diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 06c6c571b..fd75da917 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -19,11 +19,7 @@ from freqtrade import __version__ from freqtrade.configuration.timerange import TimeRange from freqtrade.constants import CANCEL_REASON, DEFAULT_DATAFRAME_COLUMNS, Config from freqtrade.data.history import load_data -from freqtrade.data.metrics import ( - DrawDownResult, - calculate_expectancy, - calculate_max_drawdown, -) +from freqtrade.data.metrics import DrawDownResult, calculate_expectancy, calculate_max_drawdown from freqtrade.enums import ( CandleType, ExitCheckTuple,