if currenttime=101458 or (not(islastbar) and time=101500) then begin
sell(1,0,market);
sellshort(1,0,market);
end
if currenttime=112958 or (not(islastbar) and time=113000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
if currenttime=145958 or (not(islastbar) and time=150000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
1秒轮询模式,保证当前的k线图上有10:15,11:30,15:00这3根k线
图表上用动态行情函数,因为动态行情的特性所以会导致历史信号的消失,所以用起来有风险,需要做特殊处理。
以前给你写的是处理过的,
if currenttime=101458 or ( time=101500) then begin
sell(1,0,market);
sellshort(1,0,market);
end
if currenttime=112958 or ( time=113000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
if currenttime=145958 or ( time=150000) then begin
sell(1,0,market);
sellshort(1,0,market);
end
改一下