N1:=6;N2:=12;M:=5;
LC:=REF(CLOSE,1);
RS1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(Abs(CLOSE-LC),N1,1)*100;
顶:crOSS(82,RS1),NODRAW;
DRAWTEXT(顶,RS1*1.01,'顶'),COLORYELLOW;
RS2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
趋势:MA((RS1+RS2)/2,M),COLOR00FF33;
启:CROSS(RS1,50) AND 趋势>REF(趋势,1),NODRAW;
DRAWTEXT(启,RS1,'★'),COLORRED;
趋率:(趋势-REF(趋势,1))/REF(趋势,1)*100,NODRAW;
B:RS1<趋势*1.15 AND (RS1-RS2)<7 AND (CROSS(趋势,50) OR 趋势<70 AND 趋势>REF(趋势,1) AND REF(趋势,1)>REF(趋势,2)),NODRAW;
警戒:趋势*1.15,COLORWHITE,LINETHICK2,POINTDOT;
安全:趋势*0.78,COLORWHITE,LINETHICK2,POINTDOT;
两阳加阴:50;{在此中界位时,选两阳加阴的k线形态介入}
持股:IF(趋势>REF(趋势,1),趋势,DRAWNULL),COLORRED,LINETHICK3;
乖离:RS1-RS2,NODRAW;
超卖:20;超买:80;多空界:50,COLORCYAN,LINETHICK2;
{BS:IF(BETWEEN(ABS(乖离),8,10)};