__ZBT
_COMM
_PAR
_VAR TYX2, D1, D2, D3, D4
_ZB OPEN, CLOSE, HIGH, LOW
_LOCAL
_RES YK, GK, 红旗
_DEF 0.000
_CODE
IF REF(COUNT(CLOSE<MA(REF(HHV((CLOSE+LOW+OPEN+HIGH)/4,40),1),3),5)=5,1) & CLOSE>MA(REF(HHV((CLOSE+LOW+OPEN+HIGH)/4,40),1),3) & CLOSE>OPEN
THEN YK=1;
ELSE YK=0;
ENDIF;
TYX2=MA(REF(HHV((CLOSE+LOW+OPEN+HIGH)/4,10),1),3);
IF REF(COUNT(CLOSE<TYX2,5)=5,1) & CLOSE>TYX2 & CLOSE>OPEN
THEN GK=1;
ELSE GK=0;
ENDIF;
KLINE(OPEN,HIGH,LOW,CLOSE,CLRYELLOW,YK=0);
KLINE(OPEN,(OPEN+CLOSE)/2,OPEN,(OPEN+CLOSE)/2,clrBlue,GK=0);
KLINE((OPEN+CLOSE)/2,CLOSE,(OPEN+CLOSE)/2,CLOSE,clrWHITE,GK=0);
D1=CLOSE=HHV(CLOSE,89);
D2=BLAST(D1,0);
IF D2>0
THEN D3=REF(CLOSE,D2);
ELSE D3=REF(CLOSE,D2);
ENDIF;
D4=CROSSUP(CLOSE,REF(D3,1));
IF D4 & COUNT(D4,5)=1
THEN 红旗=1;
ELSE 红旗=0;
ENDIF;
DRAWTEXT(LOW*0.95,红旗=1,CLRYELLOW,posBottom,posMid,"五\n面\n八\n面\n彩\n旗\n");
DRAWICON(icn24,红旗=1,LOW,posBottom,posMid,clrPurple);
__END