Ver código fonte

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

skyffire 10 meses atrás
pai
commit
856b1aa009
1 arquivos alterados com 2 adições e 1 exclusões
  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);
             }
         }