BUYHAPGU1:=REF(CLOSE REF(CLOSE,1),1) AND REF(CLOSE,1) REF(CLOSE,2) AND CLOSE =REF(CLOSE,1);
BUYHAPGU2:=REF(REF(CLOSE,1) REF(CLOSE,2) AND CLOSE =REF(CLOSE,1),1) AND CLOSE REF(CLOSE,1);
BUYHAPGU3:=BUYHAPGU1 OR BUYHAPGU2;
BUYHAPGU4:=REF(CLOSE,1) =REF(CLOSE,2) AND CLOSE REF(CLOSE,1);
BUYHAPGU5:=CLOSE=REF(CLOSE,1) OR CLOSE=MIN(REF(CLOSE,2),CLOSE);
BUYHAPGU6:=CLOSE OPEN;
BUYHAPGU7:=BUYHAPGU3 AND BUYHAPGU5 AND COUNT(BUYHAPGU4,2)=0 AND BUYHAPGU6;
DRAWTEXT(BUYHAPGU7,1*2, 波段抄底 ),colormagenta;
STICKLINE(BUYHAPGU7,0,5,2.5,0),colormagenta;