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

逻辑错误 #3

Closed
shenchaonb opened this issue Jun 23, 2021 · 1 comment
Closed

逻辑错误 #3

shenchaonb opened this issue Jun 23, 2021 · 1 comment

Comments

@shenchaonb
Copy link

    '''修改补仓止盈比率'''
    data_json = self._get_json_data()
    ratio_24hr = binan.get_ticker_24hour(symbol) #
    index = abs(ratio_24hr)

    if abs(ratio_24hr) >  8 : # 这是单边走势情况 只改变一方的比率
        if ratio_24hr > 0 : # 单边上涨,补仓比率不变

你好,作者,请问ratio_24hr返回的是什么数据结构,应该不是dict吧,abs会报错的,怎么能大于8,这个逻辑有问题吧,大于8就是单边行情吗?

@hengxuZ
Copy link
Owner

hengxuZ commented Aug 29, 2021

ratio_24hr 采用的24小时内波动比率。是int类型。如果返回的dict的话代表的是binan.get_ticker_24hour(symbol)接口报错。

@hengxuZ hengxuZ closed this as completed Aug 29, 2021
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

2 participants