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}') + # ========================================== # 核心一:经典出场逻辑 (你的原版设计) # ==========================================