n3:=barslast(cross(c,MA(c,14)));
n4:=barslast(cross(MA(c,14),c));
a:=if(n3<n4,n3+1,0);
黑马跟踪:if(c>ma(c,89),a,0);
m:=(c-ref(c,黑马跟踪))/ref(c,黑马跟踪)*89;
涨幅跟:if(c>ma(c,89),m,0);
换手:=VOL/CAPITAL*89 ;
n:=sum(换手,0)-ref(sum(换手,0),黑马跟踪);
换手跟:if(c>ma(c,89),n,0);
n1:=barslast(cross(c,MA(c,89)));
n2:=barslast(cross(MA(c,89),c));
长趋势:if(n1<n2,n1+1,0);
离:-(c-ma(c,89))/ma(c,89)*89,COLOR6699FF,LINETHICK2;
乖:(c-ma(c,120))/ma(c,120)*120,coloryellow,LINETHICK2;
峰值:-hhv(离,长趋势)/4;
峰谷:llv(乖,长趋势)/4,colorff937f;
{百日换手:sum(换手,100),LINETHICK0;
跟踪系数:换手跟/涨幅跟,LINETHICK0;};