http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=31614&page=3
没看到图,按照上面链接里面的方法发图
假设黄色线是a和绿色线是b
nn1:=barslast(cross(a,b));
nn2:=barslast(cross(b,a));
hh1:=hhv(a,nn1+1);
ll1:=llv(b,nn2+1);
if cross(a,b) then d2:=ll1;
if cross(b,a) then g2:=hh1;
就能求两个最近的高低极值,剩下的不好求了
VARIABLE:l1[]=0,hl[]=0;
m1:ma(c,5);
m2:ma(c,10);
m3:=ref(m1,1);
m4:=ref(m1,2);
if m3<m4 and m3<m1 then
l1:=m3;
if m3>m4 and m3>m1 then
h1:=m3;
a:l1;
b:h1;
ld:ubound(l1);
hd:ubound(h1);
IF LD>1 AND HD>1 THEN
BEGIN
D1:L1[LD-1];
D2:L1[LD];
C1:H1[HD-1];
C2:H1[HD];
END
//如果想记录C3,D3道理是一样的。往回取值即可
用在逐K模式下