XA_1:=EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
XA_2:=EMA(XA_1,5);
XA_3:=REFDATE(REF(HHV(HIGH,96),5),DATE);
XA_4:=REFDATE(REF(LLV(LOW,96),5),DATE);
XA_5:=(XA_3+XA_4)/2;{WWW.GOODGUPIao.COM}
旗帜顶:IF(XA_1>0 AND XA_1-XA_2<=0,XA_3,XA_3),COLORGREEN,LINETHICK3;
旗帜腰:IF(XA_1>0 AND XA_1-XA_2<=0,XA_5,XA_5),COLORGREEN,LINETHICK3;
旗帜底:IF(XA_1>0 AND XA_1-XA_2<=0,XA_4,XA_4),COLORGREEN,LINETHICK3;
五:IF(CURRBARSCOUNT=6,LOW*0.992-0.02,DRAWNULL),crOSSDOT,COLORWHITE,LINETHICK3;
十:IF(CURRBARSCOUNT=11,LOW*0.992-0.02,DRAWNULL),CROSSDOT,COLORYELLOW,LINETHICK3;
二十:IF(CURRBARSCOUNT=21,LOW*0.992-0.02,DRAWNULL),CROSSDOT,COLORRED,LINETHICK3;
三十:IF(CURRBARSCOUNT=31,LOW*0.992-0.02,DRAWNULL),CROSSDOT,COLORCYAN,LINETHICK3;
六十:IF(CURRBARSCOUNT=61,LOW*0.992-0.02,DRAWNULL),CROSSDOT,COLORYELLOW,LINETHICK3;
九十:IF(CURRBARSCOUNT=91,LOW*0.992-0.02,DRAWNULL),CROSSDOT,COLORYELLOW,LINETHICK3;
高1:IF(XA_1>0 AND XA_1-XA_2>0,XA_3,DRAWNULL),COLORRED,LINETHICK3;
中1:IF(XA_1>0 AND XA_1-XA_2>0,XA_5,DRAWNULL),COLORRED,LINETHICK3;
低1:IF(XA_1>0 AND XA_1-XA_2>0,XA_4,DRAWNULL),COLORRED,LINETHICK3;