VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 63
声望: 1

rb: 触发异常已停止
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 613, in call_strategy_func
Call function of a strategy and catch any exception raised.
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\strategies\Bonec_4h_real.py", line 173, in on_tick
self.sell(self.close_long,self.close_unit,True)
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\template.py", line 190, in sell
net
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\template.py", line 250, in send_order
self, direction, offset, price, volume, stop, lock, net
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 498, in send_order
strategy, contract, direction, offset, price, volume, lock, net
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 422, in send_local_stop_order
stop_orderid=stop_orderid,
TypeError: init() missing 1 required positional argument: 'datetime'

策略开始后,出现了如上提示。。。但是同样的代码,本机跑就没事。难道是我阿里云windows server版本有问题?

Member
avatar
加入于:
帖子: 337
声望: 27

请检查一下cta_stragety/engine.py的send_local_stop_order()函数下有没有datetime参数,没有的话请更新一下版本。后面再用这个函数的时候传入datetime参数。

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

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】