ABC1:=MAX(MAX(HIGH-LOW,ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ABC2:=(HIGH+LOW)/2+MA(ABC1,2);
ABC3:=(HIGH+LOW)/2-MA(ABC1,2);
ABC4:=REF(ABC2,BARSLAST(ABC2<=REF(ABC2,1)));
ABC5:=LLV(ABC2,2*1.5);
ABC6:=IF(ABC5!=REF(ABC5,1) AND ABC4<REF(ABC4,1),ABC4,IF(ABC4=ABC5,ABC4,ABC5));
ABC7:=BARSLAST(CROSS(0.5,ABC2=ABC6))+1;
ABC8:=CROSS(COUNT(CROSS(CLOSE,ABC6) OR CROSS(CLOSE,REF(ABC6,2)) AND ABC2>ABC6,ABC7),0.5);
ABC9:=BARSLAST(ABC8);
ABC10:=BARSLAST(CROSS(HHV(ABC3,ABC9+1),CLOSE));
ABC11:=MA(CLOSE,18);
ABC12:=CLOSE>=ABC11*1.004;
ABC13:=ABC11>=REF(ABC11,1);
ABC14:=ABC12 AND ABC13;
ABC15:=IF(CLOSE<OPEN,(CLOSE-LOW)/(HIGH-LOW),0);
今买明卖:CROSS(ABC9,ABC10) AND CLOSE/REF(LLV(LOW,3),1)<1 AND CLOSE<OPEN AND CLOSE!=LOW
AND ABC14 AND ABC15>0.03 AND ABC15<0.3, NODRAW;
DRAWTEXT(CROSS(ABC9,ABC10) AND CLOSE/REF(LLV(LOW,3),1)<1 AND CLOSE<OPEN AND CLOSE!=LOW
AND ABC14 AND ABC15>0.03 AND ABC15<0.3,0.8,' ★今买')COLORYELLOW LINETHICK6;
STICKLINE(今买明卖,1,0,1,1),COLORLIMAGENTA;
STICKLINE(今买明卖,1,0,0.1,0),COLORMAGENTA;
ABC16:=REF(今买明卖,1) AND HIGH/REF(CLOSE,1)>=1.01;
STICKLINE(ABC16,1,0,1,1),COLORBLUE;
STICKLINE(ABC16,1,0,0.1,0),COLORGREEN;
ABC17:=(HIGH/REF(CLOSE,1)-1)*100;
ABC18:=COUNT(REF(今买明卖,1) AND ABC17>=1.01,660);
成功率:ABC18/COUNT(今买明卖,0)*100,NODRAW COLORLIRED;
DRAWTEXT(ABC16,0.8,' ★明卖')COLORRED LINETHICK6;