Browse Source

撤销订单的处理。

skyfffire 1 year ago
parent
commit
8c7c3d9c3a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      strategy/src/strategy.rs

+ 2 - 2
strategy/src/strategy.rs

@@ -1013,7 +1013,7 @@ impl Strategy {
             // 开多订单处理
             if order.side == "kd".to_string() {
                 // 在价格范围内时不处理
-                if order.price <= long_upper && order.price >= long_lower && self.side == "long".to_string() {
+                if order.price <= long_upper && order.price >= long_lower && self.side != "short".to_string() {
                     continue
                 }
                 // debug!(?key, ?order.price, ?long_upper, ?long_lower);
@@ -1023,7 +1023,7 @@ impl Strategy {
             // 开空订单处理
             if order.side == "kk".to_string() {
                 // 在价格范围内时不处理
-                if order.price >= short_lower && order.price <= short_upper && self.side == "short".to_string() {
+                if order.price >= short_lower && order.price <= short_upper && self.side != "long".to_string() {
                     continue
                 }
                 // debug!(?key, ?order.price, ?short_lower, ?short_upper);