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

重新安装了下vnpy,用自带策略模板atr_rsi_strategy.py下单后,会有如下报错,有遇到过吗,求指导
[ATR] 触发异常已停止
Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 617, in call_strategy_func
func(params)
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\strategies\atr_rsi_strategy.py", line 84, in on_tick
self.bg.update_tick(tick)
File "c:\vnstudio\lib\site-packages\vnpy\trader\utility.py", line 221, in update_tick
self.on_bar(self.bar)
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\strategies\atr_rsi_strategy.py", line 108, in on_bar
self.buy(bar.close_price + 5, self.fixed_size)
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\template.py", line 169, in buy
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 506, in send_order
strategy, contract, direction, offset, price, volume, lock, net
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 368, in send_limit_order
net
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 323, in send_server_order
req_list = self.offset_converter.convert_order_request(original_req, lock, net)
TypeError: convert_order_request() takes 3 positional arguments but 4 were given

Member
avatar
加入于:
帖子: 3265
声望: 218

这个目录结构是老版的,新版剥离后engine不在vnpy.app.ctastrategy下,在剥离后的路径vnpy_ctastrategy下

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

沪公网安备 31011502017034号

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