HoldingCalc [金字塔]
- 咨詢內(nèi)容:
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 "獲取持倉(cāng)信息失敗" 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 "獲取可平持倉(cāng)信息失敗" 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
結(jié)果:
longPosition=0shortPosition=1closableLongPosition=0closableShortPosition=1
實(shí)際:有一手空單持倉(cāng),但已掛出平倉(cāng)單,沒(méi)有成交,也就是 HoldingCalc 無(wú)效?
- 金字塔客服:
3.1版確實(shí)有這個(gè)問(wèn)題,3.11BETA3版問(wèn)題已經(jīng)解決,請(qǐng)等待發(fā)布的新版
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容