有鬼!在圖表上的平空倉的時間,竟然和調試的時間不一樣! [金字塔]
- 咨詢內容:
版主好,就是下面這段代碼,調試今天(2.3)的一分鐘期指連續。
竟然發現:調試時,在標記代碼行設立斷點。然后執行到此處,顯示對應的時間是10:32分,但K線上的平空倉標記,竟然是標在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 [此貼子已經被作者于2015/2/3 18:39:16編輯過] - 金字塔客服:
還是上圖比較清楚一點
http://www.weistock.com/bbs/UploadFile/2015-2/20152320213059013.jpg [此貼子已經被作者于2015/2/3 20:23:03編輯過] - 用戶回復:
- 網友回復:
1,是不是K線數量不一致導致的,另外看下連續品種是不是用了除權數據?
- 網友回復:
版主好:很確定,我用的不是除權數據。
而且,只要把標記行上面那段if....then begin...end語句去掉,就是zhiying:=15那段,則兩處時間又能一致了!
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容