-- 有鬼!在图表上的平空仓的时间,竟然和调试的时间不一样!
版主好,就是下面这段代码,调试今天(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 begin
sellshort(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编辑过]