Skip to content
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

平仓之后(全部平仓),没有把QA_AccountPRO.positions里对应的标的删除 #1686

Open
liningbo opened this issue Mar 29, 2021 · 2 comments

Comments

@liningbo
Copy link

问题反馈

当您安装/使用QUANTAXIS的时候如果遇到任何问题, 您可以在这里提出,我们会在24小时内给您答复

您使用的QUANTAXIS版本号是什么?

您的系统信息(包括系统版本,系统架构(32/64),内存大小等等)

您的系统环境是什么?

- monodb
- 3.6
- python3.7/3.8
- 3.6
- docker(有无)
- 无

您需要反馈的问题

平仓之后(全部平仓),没有把QA_AccountPRO.positions里对应的标的删除,而只是把持仓量设置成0。 期货只操作一个标的还好,股票会操作很多标的,造成策略前期买卖的股票全部挂在QA_AccountPRO.positions这个字典里。全部平仓之后应该从QA_AccountPRO.positions删除对应的标的,开仓的时候再在QA_AccountPRO.positions里新插入。

感谢您的反馈 如有意见和建议,请在此说明:

您的联系方式(QQ/EMAIL)

18935100

THANKS
by yutiansut
2017.12

@yutiansut
Copy link
Owner

positions保存是一个并不很消耗性能的操作 即使是全市场的股票 他维护的也就是一个字典而已

@liningbo
Copy link
Author

liningbo commented Jun 1, 2021

@yutiansut 聚宽和米筐这些平台,全部卖出股票后,positions都清空了,这样在策略里可以方便的遍历当前还有仓位的股票。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants