a1:=ma(c,10);
PARTLINE(a1>=ref(a1,1),a1,colorred,2);
PARTLINE(a1<ref(a1,1),a1,colorgreen,2);
a2:=ma(c,22);
PARTLINE(a2>=ref(a2,1),a2,colorred,3);
PARTLINE(a2<ref(a2,1),a2,colorgreen,3);
a3:=ma(c,10)>=ref(ma(c,10),1) and ma(c,22)>=ref(ma(c,22),1);
a8:=ma(c,10)<ref(ma(c,10),1) and ma(c,22)<ref(ma(c,22),1);
variable:n=0,m=0;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
variable:bj=0;
variable:dt=0,kt=0;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;
uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);
if uu3 or ((ref(c,1)>ref(o,1) and h>ref(h,1) and c<ref(l,1))) or (ref(h,1)=hhv(h,3) and c<ref(l,1)) or c<ref(l,barslast(c>o)) or c<ref(l,1) then begin
n:=0;
m:=m+1;
end
//m为绿色
if uu4 or (ref(l,1)=llv(l,3) and c>ref(h,1)) or ((ref(o,1)>ref(c,1) and l<ref(l,1) and c>ref(h,1))) or c>ref(h,barslast(c<o)) or c>ref(h,1) then begin
n:=n+1;
m:=0;
end
//n为红色
STICKLINE(cross(m,0.5),o,CLOSE,7.5,0),COLORgreen;
STICKLINE(cross(n,0.5),o,c,7.5,0),COLORred;
x1:=cross(m,0.5);
x2:=cross(n,0.5);
通过代码,把“x1”与“x2”之间的最高最低点找出来。谢谢