|
|
@@ -488,6 +488,8 @@ impl Quant {
|
|
|
}
|
|
|
info!("成交单耗时数据:{}", time_record.to_string());
|
|
|
info!("更新推算仓位 {:?}", self.local_position_by_orders);
|
|
|
+ // 打印各类信息
|
|
|
+ self.strategy._print_summary();
|
|
|
// 本地计算利润
|
|
|
self._print_local_trades_summary();
|
|
|
}
|
|
|
@@ -1236,6 +1238,7 @@ pub fn run_strategy(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
|
|
|
let orders = quant.strategy.on_exit(&trade_msg);
|
|
|
if orders.is_not_empty() {
|
|
|
info!("触发onExit");
|
|
|
+ info!(?orders);
|
|
|
quant._update_local_orders(&orders);
|
|
|
spawn(async move {
|
|
|
platform_rest_fb.command_order(orders).await;
|
|
|
@@ -1246,6 +1249,8 @@ pub fn run_strategy(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
|
|
|
let orders = quant.strategy.on_sleep(&trade_msg);
|
|
|
// 记录指令触发信息
|
|
|
if orders.is_not_empty() {
|
|
|
+ info!("触发onSleep");
|
|
|
+ info!(?orders);
|
|
|
quant._update_local_orders(&orders);
|
|
|
spawn(async move {
|
|
|
platform_rest_fb.command_order(orders).await;
|
|
|
@@ -1294,8 +1299,6 @@ pub fn on_timer(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()> {
|
|
|
quant.strategy.trade_vol_24h_w = trade_vol_24h / dec!(10000);
|
|
|
quant.strategy.trade_vol_24h_w.rescale(2);
|
|
|
|
|
|
- // 打印各类信息
|
|
|
- quant.strategy._print_summary();
|
|
|
// TODO quant没有rest
|
|
|
// info!("Rest报单平均延迟{}ms", quant.rest.avg_delay);
|
|
|
// info!("Rest报单最高延迟{}ms", quant.rest.max_delay);
|