Quellcode durchsuchen

撤销条件写反了,淦

skyfffire vor 11 Monaten
Ursprung
Commit
3b42a70d8e
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      strategy/src/strategy.rs

+ 2 - 2
strategy/src/strategy.rs

@@ -955,7 +955,7 @@ impl Strategy {
                 // if order.price <= long_upper && order.price >= long_lower {
                 // if self.local_time - order.local_time <= 500 {
                 // if (self.local_time - order.local_time <= 500) && (order.price <= long_upper && order.price >= long_lower) {
-                if predictor.bid_price != order.price {
+                if predictor.bid_price == order.price {
                     continue
                 }
                 command.cancel.insert(key, value);
@@ -965,7 +965,7 @@ impl Strategy {
                 // if (self.local_time - order.local_time <= 500) && (order.price >= short_lower && order.price <= short_upper) {
                 // if order.price >= short_lower && order.price <= short_upper {
                 // if self.local_time - order.local_time <= 500 {
-                if predictor.ask_price != order.price {
+                if predictor.ask_price == order.price {
                     continue
                 }
                 // debug!(?key, ?order.price, ?short_lower, ?short_upper);