107 views
0

实盘成交或撤单会有:红色字体“2020-09-14 10:12:08,577 – INFO – 通知: 撤单成功,合约代码:DCE.eg2103,下单方向:买,开平标志:开仓,委托价格:4062,委托手数:1”

这种输出占用了程序执行时间,是否可取消,屏蔽或只输出到LOG。而不是print on screen

Answered question

如果报撤单较多的话,会严重延迟

0

取消输出只是取消打印过程,对实际运行不会有太多影响

然后你如果要取消日志输出,目前的办法是把logger关掉。在策略代码中加入:

import logging

logging.getLogger(“TqApi.TqSim”).disabled = True

Answered question
You are viewing 1 out of 1 answers, click here to view all answers.