if dangqianjia > zhiying:
maichu = exchange.Sell(-1, shuliang)
order = exchange.GetOrder(maichu)
maichuid= order["Id"]
Log("市价挂单卖出:",maichuid)
else:
Log("bu挂单卖出:",dangqianjia)
如果当前价格高于止盈价格 就市价卖出
代码提示Traceback (most recent call last): File "<string>", line 1249, in __init_ctx__ File "<string>", line 3236 maichu = exchange.Sell(-1, shuliang) ^ IndentationError: expected an indented block
提供帮助(点击头像可联系) 缩进错误,Python四个空格为一个缩进
Karox 用 Python 写的吧,IndentationError:expected an indented block 是缩进不正确的报错,检查代码是否已经严格缩进对齐,在出现错误的那一行,按空格或Tab键缩进就行,用 vscode 之类的编辑器会有提示的
feizai008 搞一天了,解决不掉这个问题,头疼 if dangqianjia > zhiying: maichu = exchange.Sell(-1, shuliang) Log("市价挂单卖出:",dangqianjia) else: Log("bu挂单卖出:",dangqianjia) 有啥问题呢
发明者量化-小小梦 FMZ上有GPT,用AI辅助检查比较方便,这个报错:IndentationError: expected an indented block 复制给AI就会给你一些建议。