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

老大你好!

我这边在centos7.6环境下,bitmex实盘上跑2.06里面的海龟策略,都可以正常下单。
换了个atr_rsi_strategy.py策略,在OKEX上跑了下,在下单的时候,报以下错误,图形界面的委托窗口中显示的是未成交,但是实际账户里面已经成交。
然后点击策略里面的停止按钮也不起作用了。
请问下这是怎么回事。

(base) [root@centos7_6 my_vnpy]# python run.py 
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/anaconda3/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/event/engine.py", line 60, in _run
    self._process(event)
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/event/engine.py", line 73, in _process
    [handler(event) for handler in self._handlers[event.type]]
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/event/engine.py", line 73, in <listcomp>
    [handler(event) for handler in self._handlers[event.type]]
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/app/cta_strategy/engine.py", line 230, in process_position_event
    self.offset_converter.update_position(position)
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/app/cta_strategy/converter.py", line 29, in update_position
    holding.update_position(position)
  File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/app/cta_strategy/converter.py", line 124, in update_position
    self.long_td = self.long_pos - self.long_yd
TypeError: unsupported operand type(s) for -: 'str' and 'int'
Member
avatar
加入于:
帖子: 23
声望: 3

升到2.0.7就好了,没有上面这个错误了,请忽略问题吧。

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

沪公网安备 31011502017034号