Explorar o código

更新持仓时,应以重新计算。

skyffire hai 1 ano
pai
achega
d3857e9ae2
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      strategy/src/predictor.rs

+ 3 - 1
strategy/src/predictor.rs

@@ -184,7 +184,9 @@ impl AvellanedaStoikov {
 
     pub fn update_inventory(&mut self, inventory: Decimal) {
         self.inventory = inventory;
-        self.inventory_vec.push_back(inventory)
+        self.inventory_vec.push_back(inventory);
+
+        self.processor();
     }
 
     pub fn update_sigma_square(&mut self) {