现在使用的是纯日内策略,基于5分钟线,k线走完再下单
想在10.15 11.30 和15.00提前2分钟下单
请问如何实现
这个讲的只是在每跟k线提前下单吧?或者要去计算那几根线距离12点有多远?有夜盘的情况下每个品种距离12点的距离都不一样啊,能不能指定那几根k线做提前下单呢?
在5分钟周期上,每个小结做提前下单。
ab:=timetot0(dynainfo(207))>=(time0-5);
if time=closetime(1) and (ab or not(islastbar)) then begin
sellshort(1,0,marketr);
sell(1,0,marketr);
end
if time=closetime(2) and (ab or not(islastbar)) then begin
sellshort(1,0,marketr);
sell(1,0,marketr);
end
if time=closetime(3) and (ab or not(islastbar)) then begin
sellshort(1,0,marketr);
sell(1,0,marketr);
end
if time=closetime(4) and (ab or not(islastbar)) then begin
sellshort(1,0,marketr);
sell(1,0,marketr);
end
老师 您这个是不是在每个小节前清仓啊?恕我还没有验证,跑的实盘怕带来损失。
我是想在小节前,距离小节结束一分钟时,如果条件满足就开平仓。
你先用模拟交易验证一下
使用固定时间间隔模式
不能用走完k线?
必须用固定时间的话,时间间隔写多少秒呢
1.不能,你要用走完k线,就要买专业版,然后用专业版的走完k线提前下单功能
2.1秒