Browse Source

htx 持仓均价异常 数据打印

JiahengHe 1 year ago
parent
commit
0bcf6d7ea6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      strategy/src/core.rs

+ 2 - 2
strategy/src/core.rs

@@ -1059,7 +1059,7 @@ impl Core {
         if self.strategy.long_pos_bias != Decimal::ZERO {
             if self.strategy.long_hold_value > Decimal::TWO * self.strategy._min_amount_value {
                 if self.strategy.long_pos_bias > dec!(4) || self.strategy.long_pos_bias < -Decimal::TWO {
-                    let exit_msg = format!("{} long_pos_bias: {},持仓均价异常,退出。", self.params.account_name, self.strategy.long_pos_bias);
+                    let exit_msg = format!("{} long_pos_bias: {},持仓均价异常,退出。mp {} avg_price {}", self.params.account_name, self.strategy.long_pos_bias, self.strategy.mp, self.strategy.pos.short_avg);
                     warn!(exit_msg);
                     self.exit_msg = exit_msg;
                     self.stop().await;
@@ -1069,7 +1069,7 @@ impl Core {
         if self.strategy.short_pos_bias != Decimal::ZERO {
             if self.strategy.short_hold_value > Decimal::TWO * self.strategy._min_amount_value {
                 if self.strategy.short_pos_bias > dec!(4) || self.strategy.short_pos_bias < -Decimal::TWO {
-                    let exit_msg = format!("{} short_pos_bias: {},持仓均价异常,退出。", self.params.account_name, self.strategy.long_pos_bias);
+                    let exit_msg = format!("{} short_pos_bias: {},持仓均价异常,退出。mp {} avg_price {}", self.params.account_name, self.strategy.short_pos_bias, self.strategy.mp, self.strategy.pos.short_avg);
                     warn!(exit_msg);
                     self.exit_msg = exit_msg;
                     self.stop().await;