有鬼!在圖表上的平空倉(cāng)的時(shí)間,竟然和調(diào)試的時(shí)間不一樣! [金字塔]
- 咨詢內(nèi)容:
版主好,就是下面這段代碼,調(diào)試今天(2.3)的一分鐘期指連續(xù)。
竟然發(fā)現(xiàn):調(diào)試時(shí),在標(biāo)記代碼行設(shè)立斷點(diǎn)。然后執(zhí)行到此處,顯示對(duì)應(yīng)的時(shí)間是10:32分,但K線上的平空倉(cāng)標(biāo)記,竟然是標(biāo)在10:18分。這怎么可能???=============================VARIABLE: zhiying=0;
if date<>ref(date,1) then begin zhiying:=20;end
A:=todaybar; if A=50 then begin buyshort(1,1,THISCLOSE);end
if hhv(enterprice-low,ENTERBARS)>=15 and holding<0 and HHVBARS(enterprice-low,ENTERBARS)>=5 then begin zhiying:=15;end if enterprice-l>=zhiying and holding<0 then beginsellshort(1,1,THISCLOSE) ;end
if time>=151300 then begin sell(holding>0,1,THISCLOSE); sellshort(holding<0,1,THISCLOSE);end [此貼子已經(jīng)被作者于2015/2/3 18:39:16編輯過] - 金字塔客服:
還是上圖比較清楚一點(diǎn)
http://www.weistock.com/bbs/UploadFile/2015-2/20152320213059013.jpg [此貼子已經(jīng)被作者于2015/2/3 20:23:03編輯過] - 用戶回復(fù):
- 網(wǎng)友回復(fù):
1,是不是K線數(shù)量不一致導(dǎo)致的,另外看下連續(xù)品種是不是用了除權(quán)數(shù)據(jù)?
- 網(wǎng)友回復(fù):
版主好:很確定,我用的不是除權(quán)數(shù)據(jù)。
而且,只要把標(biāo)記行上面那段if....then begin...end語(yǔ)句去掉,就是zhiying:=15那段,則兩處時(shí)間又能一致了!
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容