P:=10;
趋势:=zig(3,P);
↑:=TROUGHBARS(3,P,1);
↓:=PEAKBARS(3,P,1);
上:=IF(趋势>REF(趋势,1),趋势,DRAWNULL);
下:=IF(趋势
XJD:=REF(ATAN((下/REF(下,1)-1)*100)*180/3.1416,1);
买入条件:=TFILTER(↑=0,↓=0,1);
TS1:=BArslAST(买入条件);
TJ1:=REF(C,TS1);
TS2:=CONST(REF(BARSLAST(买入条件),TS1+1)+TS1+1);
TJ2:=REF(C,TS2);
TS3:=CONST(REF(BARSLAST(买入条件),TS2+1)+TS2+1);
TJ3:=REF(C,TS3);
XTK:=H
STK:=L>REF(H,1);
XG:=上>0 AND REF(下>0,1) AND XJD<(-55) AND TJ3>TJ2 AND TJ2
STICKLINE(TS1=0,0,0.5,0.1,0),COLORYELLOW;
DRAWNUMBER(TS1=0 AND C=TJ1,0.8,C),COLORCYAN;
DRAWTEXT_FIX(1,0,0,0,'红色选股信号'),COLORRED;
DRAWTEXT_FIX(1,0,0.3,0,'黄色拐点信号'),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.6,0,'青色拐点收盘价'),COLORCYAN;