通达信凹型反转副图选股公式
M值可以设定,
当为一时,中间的K线数是三四五的选股,
当为二时,中间的K线数是六七八的选股,以此类推。
源码
M:=1;
N:=M*3;
BB:=REF(C,1)/REF(O,1) 1.04 AND REF(C,1)/REF(O,1) 0.9 AND REF(C,1)/REF(C,2) 1.03;
B1:=EVERY(BB,N);
B2:=EVERY(BB,N+1);
B3:=EVERY(BB,N+2);
BJ1:=(REF(C,N+2)+REF(L,N+1))/2;
BJ2:=(REF(C,N+3)+REF(L,N+2))/2;
BJ3:=(REF(C,N+4)+REF(L,N+3))/2;
BB1:=B1 AND EVERY(REF(H,1) BJ1,N) AND REF(C,N+2)/REF(C,N+1) 1.08 AND C =REF(O,N+1) AND C =BJ1;
BB2:=B2 AND EVERY(REF(H,1) BJ2,N+1) AND REF(C,N+3)/REF(C,N+2) 1.08 AND C =REF(O,N+2) AND C =BJ2;
BB3:=B3 AND EVERY(REF(H,1) BJ3,N+2) AND REF(C,N+4)/REF(C,N+3) 1.08 AND C =REF(O,N+3) AND C =BJ3;
XG:BB1 OR BB2 OR BB3;