From ae45cc82318804df2068df920fdcd7b169030fea Mon Sep 17 00:00:00 2001 From: liaozhaorun <1300336796@qq.com> Date: Fri, 27 Feb 2026 21:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=9E=E7=9B=98=E7=AD=96?= =?UTF-8?q?=E7=95=A5=EF=BC=9AFisherTrendStrategy(FG)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- futures_trading_strategies/FG/FisherTrendStrategy/Strategy3.py | 3 +++ src/strategies/FisherTrendStrategy/Strategy3.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/futures_trading_strategies/FG/FisherTrendStrategy/Strategy3.py b/futures_trading_strategies/FG/FisherTrendStrategy/Strategy3.py index 0f55bab..0b75179 100644 --- a/futures_trading_strategies/FG/FisherTrendStrategy/Strategy3.py +++ b/futures_trading_strategies/FG/FisherTrendStrategy/Strategy3.py @@ -118,6 +118,7 @@ class PragmaticCyberneticStrategy(Strategy): self._closes.append(prev_bar.close) T, FV, FB, ATR = self._calculate_indicators() + self.log(f'T: {T:.2f} FV: {FV:.2f} FB: {FB:.2f} ATR: {ATR:.2f}') if T is None or math.isnan(ATR): return self._fbs.append(FB) @@ -133,6 +134,8 @@ class PragmaticCyberneticStrategy(Strategy): is_met = self.indicator is None or self.indicator.is_condition_met(*self.get_indicator_tuple()) + self.log(f'is_met: {is_met}, pos: {pos:.2f}, current_fb: {current_fb:.2f}, prev_fb: {prev_fb:.2f}') + # ========================================== # 核心一:经典出场逻辑 (你的原版设计) # ========================================== diff --git a/src/strategies/FisherTrendStrategy/Strategy3.py b/src/strategies/FisherTrendStrategy/Strategy3.py index 0f55bab..0b75179 100644 --- a/src/strategies/FisherTrendStrategy/Strategy3.py +++ b/src/strategies/FisherTrendStrategy/Strategy3.py @@ -118,6 +118,7 @@ class PragmaticCyberneticStrategy(Strategy): self._closes.append(prev_bar.close) T, FV, FB, ATR = self._calculate_indicators() + self.log(f'T: {T:.2f} FV: {FV:.2f} FB: {FB:.2f} ATR: {ATR:.2f}') if T is None or math.isnan(ATR): return self._fbs.append(FB) @@ -133,6 +134,8 @@ class PragmaticCyberneticStrategy(Strategy): is_met = self.indicator is None or self.indicator.is_condition_met(*self.get_indicator_tuple()) + self.log(f'is_met: {is_met}, pos: {pos:.2f}, current_fb: {current_fb:.2f}, prev_fb: {prev_fb:.2f}') + # ========================================== # 核心一:经典出场逻辑 (你的原版设计) # ==========================================