فهرست منبع

profit_now * mul,不然最新的影响太小了。

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

+ 2 - 1
strategy/src/predictor.rs

@@ -222,7 +222,8 @@ impl Predictor {
                     (self.pos_avg_price - self.mid_price) / self.pos_avg_price
                 };
 
-                self.profit_fixed_vec.push(profit_now);
+                let mul = Decimal::from(self.profit_fixed_vec.len());
+                self.profit_fixed_vec.push(profit_now * mul);
             }
         }