N1(20),N2(5);
GDSJ1:=BARSLAST(MAX(C,O)=HHV(MAX(C,O),N1));
GDSJ2:=BARSLAST(H=HHV(H,N1));
QG1:=REF(MAX(C,O),GDSJ1);
QG2:=REF(H,GDSJ2);
TP1:=CROSS(O,REF(QG1,1)) AND REF(GDSJ1>=N2,1);
TP2:=CROSS(O,REF(QG2,1)) AND REF(GDSJ2>=N2,1);
开盘突破:IF(TP1 OR TP2,1,0);
TP3:=CROSS(C,REF(QG1,1)) AND REF(GDSJ1>=N2,1);
TP4:=CROSS(C,REF(QG2,1)) AND REF(GDSJ2>=N2,1);
收盘突破:IF(TP3 OR TP4,2,0);