下单条件里面添加holding=0
这样只操作第一个出现的信号
在同一根K线上,不能有两个以上(含两个)的信号
variable:n=0;
if 开多条件 and holding=0 then begin
buy........;
n:=1;
end
if 开空条件 and holding=0 then begin
buyshort.......;
n:=1;
end
if n=1 and 开多条件 and holding=0 and exitbars>0 then buy.......;
if n=1 and 开空条件 and holding=0 and exitbars>0 then buyshort.......;
if 平多条件 and holding>0 and enterbars>0 then sell.......;
if 平空条件 and holding<0 and enterbars>0 then sellshort.......;
谢了