From b1d064d0e6ef15c0792231ac4b02a56d6ac2a780 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Tue, 23 Dec 2025 15:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=9C=BA=E7=BD=AE=E4=BF=A1=E5=BA=A6+?= =?UTF-8?q?=E5=85=A5=E5=9C=BA=E7=BD=AE=E4=BF=A1=E5=BA=A6+log+9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/templates/freqaiprimer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freqtrade/templates/freqaiprimer.py b/freqtrade/templates/freqaiprimer.py index 82adafc7..3a01c6da 100644 --- a/freqtrade/templates/freqaiprimer.py +++ b/freqtrade/templates/freqaiprimer.py @@ -856,6 +856,9 @@ class FreqaiPrimer(IStrategy): # 从 kwargs 获取当前利润,freqtrade 会传入 current_profit current_profit = float(kwargs.get('current_profit', 0.0)) + # 获取出场一字基础阈值 + base_threshold = self.ml_exit_signal_threshold.value + # 计算持仓时长(分钟) try: trade_age_minutes = max(0.0, (current_time - trade.open_date_utc).total_seconds() / 60.0)