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