소스 검색

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);
             }
         }