当信号出现时,只要求当时开仓一次
,后面不再开仓,
比如这个简单的突破,应该怎么改?谢谢!h30:=ref(hhv(h,30),1);
l30:=ref(llv(l,30),1);
long:=h>h30;
if long then
begin
sellshort(holding<0,0,limitr,h30);
buy(1,1,limitr,h30);
end
partline(holding>0,l30,colorred);
short:=l<l30;
if short then
begin
sell(holding>0,0,limitr,l30);
buyshort(1,1,limitr,l30);
end
partline(holding<0,h30,colorgreen);
buy(holding=0,1,limitr,h30);
buyshort(holding=0,1,limitr,h30);
这样改