收阴线:=C<O;
收阴天数:=BARSLASTCOUNT(收阴线);
TZ1:=(C-REF(C,收阴天数))/REF(C,收阴天数)*100;
TZ2:=COUNT(C<O,收阴天数)=收阴天数 AND TZ1<-8;
抄底:REF(TZ2,1) AND C>O AND (C/REF(C,1)-1)*100>1,COLORYELLOW;
VAR1:=PEAKBARS(3,15,1)<10;
VAR2:=IF(VAR1=1,2,0);
顶:IF(VAR2=2,2,0),COLORRED;
RSV:= (C-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*5;
FASTK:=SMA(RSV,3,1);
快:SMA(FASTK,3,1),COLORLIGREEN,COLORYELLOW;
慢:SMA(快,5,1),COLORLICYAN,COLORMAGENTA;
SET_DAY:=20;{设置个人习惯观察的天数}
DOWN_COUNT:=-4;{阴线下跌点数}
ZF:=(C/REF(C,1)-1)*100;{当日涨幅}
YX:=C<O AND ZF<=DOWN_COUNT;
TS:=BARSLAST(YX);
{全部收复阴线:IF(TS<=SET_DAY AND C>REF(O,TS) AND ZF>3,2,1);
收复阴线一半:IF(TS<=SET_DAY AND C>REF((O+C)/2,TS) AND ZF>3,3,2),COLORRED;}
DRAWTEXT(REF(C,1)/C>=1.04,(C+O)/2,'-----------------'),COLORYELLOW;
DRAWTEXT(REF(C,1)/C>=1.04,O,'--------------------------'),COLORRED;
DRAWTEXT(BARSLAST(C/REF(C,1)<0.95)<=20 && CROSS(C,REF((C+O)/2,BARSLAST(C/REF(C,1)<0.95))),L*0.955,'上穿'),COLORGREEN;
实体腰线:=O+(C-O)*0.5;
DRAWNUMBER(ZF<-4,实体腰线*0.95,实体腰线),COLORWHITE;