vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 51
声望: 1

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\vnstudio\lib\site-packages\vnpy\event\engine.py", line 60, in _run
self._process(event)
File "C:\vnstudio\lib\site-packages\vnpy\event\engine.py", line 73, in _process
[handler(event) for handler in self._handlers[event.type]]
File "C:\vnstudio\lib\site-packages\vnpy\event\engine.py", line 73, in <listcomp>
[handler(event) for handler in self._handlers[event.type]]
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 219, in process_trade_event
strategy.pos -= trade.volume
AttributeError: 'NoneType' object has no attribute 'pos'

实盘中报错,但没提示是哪个策略出了问题。。。

Member
avatar
加入于:
帖子: 3033
声望: 174

不知道你是否修改过engine了,一般情况下strategy是None的话会return的
description

Member
avatar
加入于:
帖子: 51
声望: 1

xiaohe wrote:

不知道你是否修改过engine了,一般情况下strategy是None的话会return的
description
非常感谢,确实是注释的时候不小心把这段给注释掉了。

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号