Browse Source

增加包含未实现盈亏净值字段

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

+ 2 - 0
strategy/src/core.rs

@@ -53,6 +53,8 @@ pub struct Core {
     pub handled_orders_cid: Vec<String>,
     // 本地利润值
     pub local_profit: Decimal,
+    // 本地利润值(包含未实现盈亏)
+    pub local_profit_including_unrealized: Decimal,
     // 本地U保证金
     pub local_cash: Decimal,
     // 本地币保证金

+ 2 - 1
strategy/src/strategy.rs

@@ -60,7 +60,8 @@ pub struct Strategy {
     pub start_equity: Decimal,                                      //
     pub start_coin: Decimal,                                        //
     pub start_cash: Decimal,                                        //
-    pub max_equity: Decimal,                                        //
+    pub max_equity: Decimal,                                        // 最大净值
+    pub max_equity_including_unrealized: Decimal,                   // 最大净值(包含未实现盈亏)
     pub local_profit: Decimal,                                      //
     pub total_amount: Decimal,                                      //
     pub is_ready: bool,                                             // 程序是否已经准备好,ready