-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
查询持仓总是返回none #268
Comments
麻烦提供下代码 |
非常感谢您的回复,用的就是您gitbook上范例类似的代码,主要是测试下单,查询持仓然后止损测试。 结果今天测试一切又正常了。周五测试时大部分时候一直是持仓返回None,有时返回的数据打印出来发现持仓手数有时还出现-1。。。。。 BTW:因为是初次使用CTP,想乘机请教您几个初级问题: |
比如会打印出这样的持仓,short那部分肯定不对,这是发生在我平空头仓位,然后又开了多头仓位后,打印position,出来这样: |
对的替换so文件,以及账户信息啥的 测试完需要切回原来的ctpbee 这个可能是simnow的问题 。 |
好的,了解,非常感谢您的回复。 |
在连simnow测试时,明明有持仓,但是在on_tick下用self.app.center.get_position(self.local_symbol) 总是返回None,请问怎么解决?thx
The text was updated successfully, but these errors were encountered: