P:=14;
乖离率:=(c-ma(c,250))/ma(c,250)*100;
n1:=barslast(cross(c,MA(c,250)));
n2:=barslast(cross(MA(c,250),c));
长趋:if(n1
n3:=barslast(c>ma(c,120) and cross(c,wMA(c,P)));
n4:=barslast(cross(wMA(c,P),c) and c>ma(c,120));
短跟:if(n3
长涨:=(c-ref(c,长趋))/ref(c,长趋);
换手:=vol/CAPITAL*100 ;
百换:sum(换手,100);
DRAWICON(CROSS(短跟,0.1),100, 1);
短换:sum(换手,0)-ref(sum(换手,0),短跟);
系数:短涨/短换*100 ;
TJ1:=乖离>5 AND 乖离<80;
TJ2:=长趋>20 AND 长趋<400;
TJ3:=百换>100 AND 百换<400;
黑马:(TJ1 AND TJ2 AND TJ3 AND 短跟>0)*短跟*10,coloryellow,STICK,LINETHICK3;
买:(黑马>0 AND REF(黑马,1)=0)*黑马,STICK,COLORWHITE,LINETHICK3;