ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);
a:=time0;
c1:=dynainfo(207);
b:=timetot0(dynainfo(207));
if abb then begin
if holding>0 and ma5<ma10 then sell(1,1,limitr,close-5);
if holding<0 and ma5>ma10 then sellshort(1,1,limitr,close+5);
if holding=0 and ma5>ma10 then buy(1,1,limitr,close+5);
if holding=0 and ma5<ma10 then buyshort(1,1,limitr,close+5);
end
以上代码是大神在多个帖子中给出的提前下单的代码,但我在图标模拟中交易总是在59秒报单,请问是否需要勾选持仓同步?或者有其他需要注意的地方我没有注意到?
走完k线模式不可以,
逐k线模式下可以
这两个不是一样的,你看看是不是用了走完k线的交易模式,在图表交易的界面里面
[此贴子已经被作者于2015/7/3 8:48:50编辑过]
图1里怎么设置都不会影响交易,你需要按照图2里面的改,设置为固定时间间隔模式,间隔1秒

此主题相关图片如下:1.png


此主题相关图片如下:2.png