以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 高级功能研发区 (http://www.weistock.com/bbs/list.asp?boardid=5) ---- 自定义函数区分买开买平和卖开卖平 (http://www.weistock.com/bbs/dispbbs.asp?boardid=5&id=86332) |
-- 作者:Prongs -- 发布时间:2015/10/19 10:59:49 -- 自定义函数区分买开买平和卖开卖平 自定义函数已经可以读取固定价格的未成交手数,但是无论买开买平或者卖开卖平返回的都为正数,请问数据中哪一项可以获得报单方向,如何像金字塔函数那样通过1234来区分买开买平和卖开卖平? Function ORDERNUM(Formula,a) dim temp for i=0 to order.OrderNum2-1 call order.OrderInfo2(i, OrderID, ConSign, Filled, Remaining, Action, OrderType, LmtPrice, Account, Kaiping, Code, Market) if LmtPrice = a then temp = Remaining end if next ORDERNUM=temp End Function
|
-- 作者:guotx2010 -- 发布时间:2015/10/19 11:19:47 -- Aspect是开仓方向,0-买入,1-卖出 Kaiping是开仓、平仓,0-开仓,1-平仓,2-平今
请看 vba编程信息中的Order对象 |