老师,我写了一些模型历史测试时都没有交易结果
buy(cross(c,ma(20,c)),1,thisclose);
sell(cross(ma(20,c),c),1,thisclose);
类似这个,老师,为什么没有交易信号呢?
VARIABLE:n=0,a=0;
oo:=valuewhen(day<>ref(day,1),o);
if time<101500 and n=0 and h>=oo+15 then BEGIN
buy(holding=0,1,limitr,oo+15.6);
n:=1;
a:=h;
end
if holding=1 and n=1 and time>=150500 then begin
sell(1,1,market);
n:=0;
end
老师看看这个又是哪里错了呢?
没有错,有信号的
如果是测评没数据的话,可能是时间周期没有选择对应的分钟数据,用time判断条件,在日线上不可行