skyffire 8 ماه پیش
والد
کامیت
7140ceb98d
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      strategy/src/predictor.rs

+ 2 - 2
strategy/src/predictor.rs

@@ -435,13 +435,13 @@ impl Predictor {
             // 硬止损
             (self.profit < dec!(-0.01))
             // 利润较大时,追踪止盈
-            || (self.profit_high > dec!(0.01) && self.profit < self.profit_high * dec!(0.75))
+            || (self.profit > dec!(0.01) && self.profit < self.profit_high * dec!(0.75))
         );
         let is_close_short = self.inventory < Decimal::ZERO && (
             // 硬止损
             (self.profit < dec!(-0.01))
             // 利润较大时,追踪止盈
-            || (self.profit_high > dec!(0.01) && self.profit < self.profit_high * dec!(0.75))
+            || (self.profit > dec!(0.01) && self.profit < self.profit_high * dec!(0.75))
         );
         let is_open_long = self.inventory.is_zero()
             && self.fair_price > self.mid_price * (Decimal::ONE + self.params.open)