结算信息确认成功函数
资金栏里均价和盈亏是每日结算的价格和当天盈亏损…
但如果使用的是低频CTA 策略, 不咋关注每天盈亏和结算价…只想登录时看看整体盈亏,和总体持仓均价…
同时又需要策略里调用平均持仓价格,可以按下面修改….
def onRspSettlementInfoConfirm(self, data: dict, error: dict, reqid: int, last: bool):
"""
Callback of settlment info confimation.
"""
self.gateway.write_log("结算信息确认成功")
while True:
self.reqid += 1
n = self.reqQryInstrument({}, self.reqid)
if not n:
break
else:
sleep(1)
Excellent blog post. I definitely appreciate this site. Continue the good work!
Itís hard to find experienced people about this topic, but you seem like you know what youíre talking about! Thanks