請教一段代碼 [金字塔]
-
咨詢內(nèi)容:
if TIME>225955 then begin
?if 5mfx=1 then begin
??if tholding2+TREMAINQTY(3,"" ,"" )<-e then tcancel(1,3);
??if tholding2+TREMAINQTY(2,"" ,"" )<-3*e then tcancel(1,2);
??if tholding2+TREMAINQTY(1,"" ,"" )>4*e then tcancel(1,1);
??if tholding2+TREMAINQTY(4,"" ,"" )>3*e then tcancel(1,4);
?end
?
?if 5mfx=-1 then begin
??if tholding2+TREMAINQTY(1,"" ,"" )>e then? tcancel(1,1);
??if tholding2+TREMAINQTY(4,"" ,"" )>3*e then tcancel(1,4);
??if tholding2+TREMAINQTY(3,"" ,"" )<-4*e then tcancel(1,3);
??if tholding2+TREMAINQTY(2,"" ,"" )<-3*e then tcancel(1,2);
?end
?
end??
?
這段代碼編譯時總說end語句前缺少begin,但看來看去沒找著在哪缺,如果新建一個新的交易系統(tǒng)文件,單純貼這段代碼進(jìn)去,編譯時依然是說end語句前缺少begin,而不是先說e沒有定義,不知問題出在什么地方。
?
-
金字塔客服:
是這樣的,你的begin-end 沒錯。是你的TREMAINQTY(4,"" ,"" )錯了。TREMAINQTY(1,'' ,'' )就行了。另外e和5mfx代碼里的定義也補(bǔ)下。
?
?來源:程序化久久網(wǎng)( www.tumamayizhan.com )
-
用戶回復(fù):
那這個時間的寫法對嗎,好象實(shí)際中,到時間并沒反應(yīng)
?
-
網(wǎng)友回復(fù):
沒有問題,建議你用debugfile 跟蹤輸出自己的條件,進(jìn)而分析定位問題所在。
?
?
-
網(wǎng)友回復(fù):
這里面的time的寫法是應(yīng)該寫time()還是直接time就可以?
?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容