//4周转向
hh:=ref(hhv(h,20),1);
ll:=ref(llv(l,20),1);
entertime:=time<=143000;
if holding<0 and h>hh then begin
sellshort(1,1,limitr,max(o,hh+0.2)+0.6);//先是平仓
buy(1,1,limitr,max(o,hh+0.2)+0.6);
goto skip@;
end
if holding>0 and l<ll then begin
sell(1,1,limitr,min(o,ll-0.2)-0.6);//先是平仓
buyshort(1,1,limitr,min(o,ll-0.2)-0.6);
end
skip@;
//注意做多条件和做空条件同时成立的处理方法,这里采用20周期均线向上才做多,向下才做空
if holding=0 and h>hh and ref(c,1)>ref(c,20) and entertime then buy(1,1,limitr,max(o,hh+0.2)+0.6);//后开仓
if holding=0 and l<ll and ref(c,1)<ref(c,20) and entertime then buyshort(1,1,limitr,min(o,ll-0.2)-0.6);//后开仓
if time>=150000 then begin
sell(1,1,limitr,o);
sellshort(1,1,limitr,o);
end
这个模型里
goto skip@;和skip@;
都是什么意思?怎么用啊?谢谢
无条件跳转
goto skip@ 和skip@ 要成对出现