现K低于A-8点, 且前4K中有1K低于A-8点, 开空
A:= hhv(h, todaybar);
if ref(L,1)<(A-8) or ref(L,2)<(A-8) or ref(L,3)<(A-8) or ref(L,4)<(A-8) and L<=a-8 then begin
buyshort(holding=0,1,market);
end
对不对?
其它方法?
A:= hhv(h, todaybar);
if l<a-8 and ref(any(l<a-8,4),1) then begin
buyshort(holding=0,1,market);
end
用any你再想想看对不对
我要的是第二种
any会有第一种
那你写的也不对,你写的和我一个意思,只不过我是简化了的
要写成
ref(l,1)<a-8 and not(ref(l,2)<a-8) and not(ref(l,3)<a-8) and not(ref(l,4)<a-8) or
ref(l,2)<a-8 and not(ref(l,1)<a-8) and not(ref(l,3)<a-8) and not(ref(l,4)<a-8) or
ref(l,3)<a-8 and not(ref(l,1)<a-8) and not(ref(l,2)<a-8) and not(ref(l,4)<a-8) or
ref(l,4)<a-8 and not(ref(l,1)<a-8) and not(ref(l,2)<a-8) and not(ref(l,3)<a-8)
前4只有一个 条件成立
不能简化?