AA1:=FILTER(LOW=LLV(LOW,13),8);
AA2:=IF(LLV(LOW,3)=LLV(LOW,13) AND CLOSE<REF((HIGH+LOW)/2,1),MAX(REF(LLV(LOW,12),BARSLAST(AA1)+1)-LOW,0),0);
AA3:=EMA(AA2,3)*3;
AA4:=SUMBARS(AA3>0,21);
AA5:=SUM(AA3,AA4)/21;
AA6:=REF(AA3,1)=HHV(AA3,3) AND REF(AA3,1)>AA5*3 AND COUNT(CLOSE/REF(CLOSE,1)<0.9025,8)=0 AND LLV(LOW,3)/HHV(HIGH,18)<0.88;
反转:FILTER(AA6 ,5),colorblack;
STICKLINE(CLOSE,0,AA3,8,1),coloryellow;
STICKLINE(反转,0,AA3,8,0),colorred;
xopen:=(REF(O,1)+REF(C,1))/2;
xclose:=CLOSE;
xhigh:=MAX(HIGH,xopen);
xlow:=MIN(LOW,xopen);
volality:=MA(xhigh-xlow,8);
凰线:MA(xclose,5)+volality/2;
凤线:MA(xclose,5)-volality/2;
bu:=CROSS(xclose,凰线);
sel:=CROSS(凤线,xclose);
var1:=BARSLAST(bu);
var2:=BARSLAST(sel);
VERLINE(REF(var1,1)>var2 AND var1=0,2),colorred;
VERLINE(REF(var2,1)>var1 AND var2=0,2),colorgreen;