我用 A_GetPosition 查询持仓为什么总是失败呢?
//------------------------------------------------------------------------ // 简称: test // 名称: test // 类别: 策略应用 // 类型: 内建应用 // 输出: //------------------------------------------------------------------------ Params Vars Defs //log输出 Integer LogFile(StringRef str) { FileAppend(FormulaName()+".txt","["+Text(SystemDateTime())+"] "+ str); Return 0; } Events OnInit() { } OnBar(ArrayRef<Integer> indexs) { Position mypos; if(A_GetPosition(mypos,"",0)) { Print(DateTimeToString(date+time) + " 查询持仓成功:" + Text(mypos)); } else { Print(DateTimeToString(date+time) + " 查询持仓失败 " + FormulaName()); } } //成交更新事件函数,参数ordFill表示更新的成交结构体 OnFill(FillRef ordFill) { Print("-----> 成交:" + Text(ordFill)); PlotString("tip", "成交", Close, Green); } //通用事件触发函数,参数evtName为事件名称,参数evtValue为事件内容 OnEvent(StringRef evtName,MapRef<String,String> evtValue) { }帮我看下哪里写错了吗,我的账号也登陆了。换了好几种方式都是查询持仓失败。