N天内:=3;
左长黑:=(C/REF(C,1)<0.937 AND C/REF(C,1)>0.91) OR
(C/REF(C,1)<0.975 AND C/REF(C,1)>0.91 AND REF(C,1)/REF(C,2)<0.975 AND
REF(C,1)/REF(C,2)>0.91 AND C/REF(C,2)<0.938);
休息:=ABS(C-REF(C,1))/REF(C,1)<0.02;
长黑休息:=左长黑 OR (REF(左长黑,1) AND 休息) OR (REF(左长黑,2) AND COUNT(休息,2)=2)
OR (REF(左长黑,3) AND COUNT(休息,3)=3) OR (REF(左长黑,4) AND COUNT(休息,4)=4);
右长红:=(C/REF(C,1)>1.063) OR (C/REF(C,1)>1.025 AND REF(C,1)/REF(C,2)>1.025 AND
C/REF(C,2)>1.063);
XG: REF(C,N天内)/REF(C,1+N天内)>1 AND
COUNT(长黑休息,3+N天内)>0 AND COUNT(右长红,2+N天内)>0;