|
|
@@ -315,6 +315,7 @@ impl Quant {
|
|
|
|
|
|
pub fn update_local_order(&mut self, data: OrderInfo, time_record: &mut MutexGuard<DelayTime>) {
|
|
|
if data.filled != Decimal::ZERO {
|
|
|
+ info!("\n\n");
|
|
|
info!("接收到订单信息①:{:?}", data);
|
|
|
}
|
|
|
/*
|
|
|
@@ -488,10 +489,11 @@ impl Quant {
|
|
|
}
|
|
|
info!("成交单耗时数据:{}", time_record.to_string());
|
|
|
info!("更新推算仓位 {:?}", self.local_position_by_orders);
|
|
|
- // 打印各类信息
|
|
|
- self.strategy._print_summary();
|
|
|
// 本地计算利润
|
|
|
self._print_local_trades_summary();
|
|
|
+ // 打印各类信息
|
|
|
+ self.strategy.local_orders = self.local_orders.clone();
|
|
|
+ self.strategy._print_summary();
|
|
|
}
|
|
|
// 每次有订单变动就触发一次策略
|
|
|
if self.mode_signal == 0 && self.ready == 1 {
|
|
|
@@ -672,10 +674,10 @@ impl Quant {
|
|
|
}
|
|
|
}
|
|
|
// 更新仓位信息
|
|
|
- info!("收到新的仓位推送, position: {:?}, local_position: {:?}", data, position);
|
|
|
if position != self.local_position {
|
|
|
- self.local_position = position;
|
|
|
+ info!("收到新的仓位推送, position: {:?}, local_position: {:?}", data, position);
|
|
|
info!("更新本地仓位:{:?}", self.local_position);
|
|
|
+ self.local_position = position;
|
|
|
}
|
|
|
}
|
|
|
|