Explorar el Código

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

skyffire hace 1 año
padre
commit
d3857e9ae2
Se han modificado 1 ficheros con 3 adiciones y 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) {