1
Follow
0
Followers
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
Related Recommendations
Inventor Quant Workflow FAQ (Continuously Updated)Financial Magic Zone Global KOL RecruitmentFAQ Summary (Updating...)PINE Language Introductory Tutorial of FMZ QuantPrimary Tutorial of Strategy Writing with FMZ Quant Trading Platform (Must Read)Getting Started with FMZ Quant Trading Platform (Must Read)MyLanguage Doc
Comment
All comments (4)
用 Python 写的吧,IndentationError:expected an indented block 是缩进不正确的报错,检查代码是否已经严格缩进对齐,在出现错误的那一行,按空格或Tab键缩进就行,用 vscode 之类的编辑器会有提示的
3 years ago
- 1


