if cross(c,上轨) and time>091500 and time<150000 then
begin
buy(holding=0,ss,limitr,上轨);
end
if cross(下轨,c) and time>091500 and time<150000 then
begin
buyshort(holding=0,ss,limitr,下轨);
end
if holding>0 and cross(中轨,c) then
begin
sell(1,0,limitr,中轨);
end
if holding<0 and cross(c,中轨) then
begin
sellshort(1,0,limitr,中轨);
end
上面这段代码如何实现走完k线开仓,平仓固定轮询?请教高手帮助
if ref(cross(c,上轨),1) and time>091500 and time<150000 then
begin
buy(holding=0,ss,limitr,上轨);
end
if ref(cross(下轨,c),1) and time>091500 and time<150000 then
begin
buyshort(holding=0,ss,limitr,下轨);
end
if holding>0 and cross(中轨,c) then
begin
sell(1,0,limitr,中轨);
end
if holding<0 and cross(c,中轨) then
begin
sellshort(1,0,limitr,中轨);
end
使用固定时间间隔模式,时间间隔设置为1秒