有个想法,5根K线中至少有2个是阴线,且5根K线中至少有4个上影线大于1,开空,能不能表述?
//仅供参考
variable:a:=0;
variable:b:=0;
for i=1 to 5 do
begin
if ref(o,i)>ref(c,i) and islastbar then a:=a+1;
if ref(o,i)>ref(c,i) and ref(h,i)-ref(o,i)>1 and islastbar then b:=b+1;
if ref(o,i)<ref(c,i) and ref(h,i)-ref(c,i)>1 and islastbar then b:=b+1;
end
条件成立:a>=2 and b>=4;
aa:a;
bb:b;
if a>=2 and b>=4 then buyshort(1,1,market);