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