固定时间间隔,一分钟图,如何实现上一根K线走完之前N秒下单?谢谢
不能,
已经是上一根K线了,说明已经有了新一根的K线,上一根K线已经形成了.
还怎么回到过去的某个时间点.
你逻辑也不严密啊。最后N秒如果信号消失的话,希望如何处理?
ma5:=ma(c,5);
ma10:=ma(c,10);
abb:=(mod(dynainfo(207),100)>55 and islastbar) or not(islastbar);//适用1分钟K线图
//也可以这样写,要注意保证本机时间准确 abb:=(mod(currenttime,100)>55 and islastbar) or not(islastbar);
if holding>0 and ma5<ma10 and abb then sell(1,1,thisclose);
if holding<0 and ma5>ma10 and abb then sellshort(1,1,thisclose);
if holding=0 and ma5>ma10 and abb then buy(1,1,thisclose);
if holding=0 and ma5<ma10 and abb then buyshort(1,1,thisclose);
信号消失的话,希望怎么处理,你就人工处理吧
最好买个专业版。专业版超级厉害。