金字塔kaiping的判斷 [金字塔]
- 咨詢內容:
Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account, AccountType)
dim acfl1
acfl1="800007"'跟蹤帳戶
if Status="Tradeing" and filled>0 and Account=acfl1 and code="if09" then
if aspect=0 thencall Document.SetExtData("ACFL1_thold_if",document.GetExtData("ACFL1_thold_if")+filled)
end if
if aspect=1 then
call Document.SetExtData("ACFL1_thold_if",document.GetExtData("ACFL1_thold_if")-filled)
end if
end ifEnd Sub
=====================
買入N手外生全局變量就加上N手
賣出N手外生全局變量就減去N手~
但是無論我怎么操作那個ACFL1_thold_if還是等于0...
[此貼子已經被作者于2012-9-3 13:21:17編輯過] - 金字塔客服:
if aspect=0 then 你想表示的是買入開倉,可是買入平倉也會成立的,所以應該加上kaiping的判斷吧
if aspect=0 and kaiping=0 then
- 用戶回復: 以下是引用guotx2010在2012-9-3 15:05:33的發言:
if aspect=0 then 你想表示的是買入開倉,可是買入平倉也會成立的,所以應該加上kaiping的判斷吧
if aspect=0 and kaiping=0 then
這個無所謂開平~
只要是買入1手那個全局變量就+1
賣出就-1
但是我這段代碼ACFL1_thold_if一直等于0~
我有點不明白
- 網友回復: 那你使用application.msgout輸出信息,看看代碼走到了沒有?
- 網友回復:
if Status="Tradeing" and filled>0 then
測試了一下 總覺得你這句話有問題 你用這句話 替換你第一句if語句我替換了一下 就可以了 主要的問題是 第一句if沒執行
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 262069696 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容