Selaa lähdekoodia

不用平仓,单子没办法识别

skyfffire 11 kuukautta sitten
vanhempi
commit
7bedaf2a17
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      strategy/src/strategy.rs

+ 4 - 2
strategy/src/strategy.rs

@@ -981,7 +981,8 @@ impl Strategy {
                 let client_id = utils::generate_client_id(Some(self.broker_id.clone()));
                 let order = vec![
                     amount.to_string(),
-                    if predictor.inventory < Decimal::ZERO {"pk".to_string()} else {"kd".to_string()},
+                    // if predictor.inventory < Decimal::ZERO {"pk".to_string()} else {"kd".to_string()},
+                    "kd".to_string(),
                     target_buy_price.to_string(),
                     client_id.clone(),
                 ];
@@ -1023,7 +1024,8 @@ impl Strategy {
                 let client_id = utils::generate_client_id(Some(self.broker_id.clone()));
                 let order = vec![
                     amount.to_string(),
-                    if predictor.inventory > Decimal::ZERO {"pd".to_string()} else {"kk".to_string()},
+                    // if predictor.inventory > Decimal::ZERO {"pd".to_string()} else {"kk".to_string()},
+                    "kk".to_string(),
                     target_sell_price.to_string(),
                     client_id.clone(),
                 ];