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

用同花顺跟单聚宽,提示TypeError: '<=' not supported between instances of 'str' and 'int'怎么解决 #468

Open
sqr1sqr opened this issue May 27, 2022 · 0 comments

Comments

@sqr1sqr
Copy link

sqr1sqr commented May 27, 2022

env

OS: win10
PYTHON_VERSION: 3.8
EASYTRADER_VERSION: 0.xx.xx
BROKER_TYPE: gj / ht / xq / xxx

problem

跟单聚宽
2022-05-27 09:34:53,922 [INFO] joinquant_follower.py 78: 开始跟踪策略: 一
2022-05-27 09:42:11,759 [INFO] follower.py 202: 策略 [一] 发送指令到交易队列, 股票: sz002000 动作: sell 数量: 1400 价格: 14.80 信号产生时间: 2022-05-27 09:42:00
Exception in thread Thread-1:
2022-05-27 09:42:11,763 [INFO] follower.py 202: 策略 [一] 发送指令到交易队列, 股票: sh603000 动作: sell 数量: 5600 价格: 6.71 信号产生时间: 2022-05-27 09:42:00
Traceback (most recent call last):
File "D:\Python38\lib\threading.py", line 932, in _bootstrap_inner
2022-05-27 09:42:11,768 [INFO] follower.py 202: 策略 [一] 发送指令到交易队列, 股票: sz002111 动作: sell 数量: 4800 价格: 7.06 信号产生时间: 2022-05-27 09:42:00
self.run()
File "D:\Python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Python38\lib\site-packages\easytrader\follower.py", line 353, in trade_worker
self._execute_trade_cmd(
File "D:\Python38\lib\site-packages\easytrader\follower.py", line 281, in _execute_trade_cmd
if not self._is_number(price) or price <= 0:
TypeError: '<=' not supported between instances of 'str' and 'int'
2022-05-27 09:47:12,777 [INFO] follower.py 202: 策略 [一] 发送指令到交易队列
image

how to repeat

@sqr1sqr sqr1sqr changed the title 用同花顺跟单,提示TypeError: '<=' not supported between instances of 'str' and 'int'怎么解决 用同花顺跟单聚宽,提示TypeError: '<=' not supported between instances of 'str' and 'int'怎么解决 May 27, 2022
stairclimber added a commit to stairclimber/easytrader that referenced this issue Jan 19, 2024
the condition branch I just modified have a bug when program is in univisal_ths-joinquant mode. bug details references shidenggui#468,  so I update judgment conditions to avoid program crashes
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

1 participant