开空的那个K线和当天最高价的那个K线差多少个周期。
开多的那个K线和当天最低价的那个K线差多少个周期。
L1:=llv(l,barslast(date<>ref(date,1)));
H1:=hhv(h,barslast(date<>ref(date,1)));
L2:=barslast(l>l1);
L3:=barslast(h<h1);
if type(1)=1 then begin
V1:=enterbars;
L4:=L2;
end
if type(1)=3 then begin
V2:=enterbars;
L5:=L3;
end
空间隔:L4-V2,nodraw;
多间隔:L5-V1,nodraw;
//以上代码,需要验证,你加到你的策略中,看看指标输出是否是你要的效果。