HoldingCalc [金字塔]
- 咨询内容:
Sub Test()
dim longPosition,shortPosition,closableLongPosition,closableShortPosition dim longCost,longTodayPosition,shortCost,shortTodayPosition,pnl,usedMargin dim ret ret=0 longCost=-1 Order.HoldingCalc=1 ret=Order.HoldingInfoByCode2("IF03","ZJ",longPosition,longCost,longTodayPosition,shortPosition,shortCost,shortTodayPosition,pnl,usedMargin) if ret=0 and longCost=-1 then application.MsgOut "获取持仓信息失败" else ret=0 longCost=-1 Order.HoldingCalc=0 ret=Order.HoldingInfoByCode2("IF03","ZJ",closableLongPosition,longCost,longTodayPosition,closableShortPosition,shortCost,shortTodayPosition,pnl,usedMargin) if ret=0 and longCost=-1 then application.MsgOut "lfont-family: Verdana;"> application.MsgOut "shortPosition=" & shortPosition application.MsgOut "获取可平持仓信息失败" else application.MsgOut "lfont-family: Verdana;"> application.MsgOut "shortPosition=" & shortPosition application.MsgOut "closableLfont-family: Verdana;"> application.MsgOut "closableShortPosition=" & closableShortPosition end if end if End Sub
结果:
longPosition=0shortPosition=1closableLongPosition=0closableShortPosition=1
实际:有一手空单持仓,但已挂出平仓单,没有成交,也就是 HoldingCalc 无效?
- 金字塔客服:
3.1版确实有这个问题,3.11BETA3版问题已经解决,请等待发布的新版
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容