X_1:=STRCAT(5388,STRCAT(STRCAT(STRCAT(5389,HYBLOCK),STRCAT(5390,DYBLOCK)),STRCAT(5391,GNBLOCK)));DRAWTEXT_FIX(ISLASTBAR,0.005,0.02,0,X_1),COLORMAGENTA;
X_2:=REF(CLOSE,1);
X_3:=REF(CLOSE,1)*1.097;
X_4:=CLOSE>=X_3 AND CLOSE=HIGH;
STICKLINE(X_4,OPEN,CLOSE,2.5,0),COLORYELLOW;
X_5:=IF(DTPRICE(REF(CLOSE,1),0.1)=CLOSE,2,0);
STICKLINE(X_5,OPEN,CLOSE,2.5,0),COLORGREEN;
X_6:=LOWX_7:=LOW>REF(LOW,1) AND HIGH>REF(HIGH,1);
X_8:=LOW=REF(HIGH,1) AND REF(LOW,1)>=REF(LOW,2) AND REF(HIGH,1)<=REF(HIGH,2) AND HIGHX_9:=HIGH>REF(HIGH,1) AND LOW<=REF(LOW,1) AND REF(HIGH,1)<=REF(HIGH,2) AND REF(LOW,1)>=REF(LOW,2) AND LOW>REF(LOW,2) AND COUNT(X_7,BARSLAST(X_6))=0;
X_10:=HIGH=REF(HIGH,2) AND LOWREF(LOW,1) AND REF(HIGH,1)>=REF(HIGH,2) AND REF(LOW,1)<=REF(LOW,2) AND HIGH>REF(HIGH,2) AND COUNT(X_7,BARSLAST(X_6))=0;X_12:=X_6 OR X_8 OR X_10;X_13:=X_7 OR X_9 OR X_11;X_14:=X_13 AND COUNT(X_13,BARSLAST(X_12))=1;X_15:=X_12 AND COUNT(X_12,BARSLAST(X_13))=1;X_16:=IF(X_14,LLV(LOW,1+BARSLAST(X_15)),0);X_17:=IF(X_16,X_16,REF(X_16,BARSLAST(X_16)));X_18:=IF(X_15,HHV(HIGH,1+BARSLAST(X_14)),0);X_19:=IF(X_18,X_18,REF(X_18,BARSLAST(X_18)));X_20:=HIGH>=REF(HIGH,1) AND LOW<=REF(LOW,1);X_21:=HIGH<=REF(HIGH,1) AND LOW>=REF(LOW,1);X_22:=X_20 OR X_21;X_23:=HIGH>=REF(HIGH,1) AND LOW<=REF(LOW,1) AND REF(LOW,1)>=REF(HIGH,2) AND REF(HIGH,1)<=REF(HIGH,2) AND HIGH>=REF(HIGH,2);X_24:=HIGH<=REF(HIGH,1) AND LOW>=REF(LOW,1) AND REF(HIGH,1)>=REF(HIGH,2) AND REF(LOW,1)<=REF(LOW,2) AND LOW<=REF(LOW,2);X_25:=X_23 OR X_24 AND (COUNT(X_15,BARSLAST(X_14))=0 OR X_15);X_26:=HIGH>=REF(HIGH,1) AND LOW<=REF(LOW,1) AND REF(HIGH,1)<=REF(HIGH,2) AND REF(LOW,1)>=REF(LOW,2) AND LOW>=REF(LOW,2);X_27:=HIGH<=REF(HIGH,1) AND LOW>=REF(LOW,2) AND REF(LOW,1)<=REF(LOW,2) AND REF(HIGH,1)>=REF(HIGH,2) AND HIGH>=REF(HIGH,2);X_28:=X_26 OR X_27 AND (COUNT(X_14,BARSLAST(X_15))=0 OR X_14);X_29:=X_25 OR X_28;X_30:=BARSLAST(X_17!=REF(X_17,1))-COUNT(X_22,BARSLAST(X_17!=REF(X_17,1)))+COUNT(X_29,BARSLAST(X_17!=REF(X_17,1)))>2 AND HIGH=HHV(HIGH,1+BARSLAST(X_17!=REF(X_17,1))) AND COUNT(LOW0;X_31:=SUMBARS(X_17!=REF(X_17,1),2)-COUNT(X_22,SUMBARS(X_17!=REF(X_17,1),2))+COUNT(X_29,SUMBARS(X_17!=REF(X_17,1),2))>3 AND HIGH=HHV(HIGH,SUMBARS(X_17!=REF(X_17,1),2)) AND REF(X_17,SUMBARS(X_17!=REF(X_17,1),2)-1)<=LLV(LOW,SUMBARS(X_17!=REF(X_17,1),2));X_32:=SUMBARS(X_17!=REF(X_17,1),3)-COUNT(X_22,SUMBARS(X_17!=REF(X_17,1),3))+COUNT(X_29,SUMBARS(X_17!=REF(X_17,1),3))>3 AND HIGH=HHV(HIGH,SUMBARS(X_17!=REF(X_17,1),3)) AND REF(X_17,SUMBARS(X_17!=REF(X_17,1),3)-1)<=LLV(LOW,SUMBARS(X_17!=REF(X_17,1),3));X_33:=SUMBARS(X_17!=REF(X_17,1),4)-COUNT(X_22,SUMBARS(X_17!=REF(X_17,1),4))+COUNT(X_29,SUMBARS(X_17!=REF(X_17,1),4))>3 AND HIGH=HHV(HIGH,SUMBARS(X_17!=REF(X_17,1),4)) AND REF(X_17,SUMBARS(X_17!=REF(X_17,1),4)-1)<=LLV(LOW,SUMBARS(X_17!=REF(X_17,1),4));X_34:=SUMBARS(X_17!=REF(X_17,1),5)-COUNT(X_22,SUMBARS(X_17!=REF(X_17,1),5))+COUNT(X_29,SUMBARS(X_17!=REF(X_17,1),5))>3 AND HIGH=HHV(HIGH,SUMBARS(X_17!=REF(X_17,1),5)) AND REF(X_17,SUMBARS(X_17!=REF(X_17,1),5)-1)<=LLV(LOW,SUMBARS(X_17!=REF(X_17,1),5));X_35:=SUMBARS(X_17!=REF(X_17,1),6)-COUNT(X_22,SUMBARS(X_17!=REF(X_17,1),6))+COUNT(X_29,SUMBARS(X_17!=REF(X_17,1),6))>3 AND HIGH=HHV(HIGH,SUMBARS(X_17!=REF(X_17,1),6)) AND REF(X_17,SUMBARS(X_17!=REF(X_17,1),6)-1)<=LLV(LOW,SUMBARS(X_17!=REF(X_17,1),6));X_36:=BARSLAST(X_19!=REF(X_19,1))-COUNT(X_22,BARSLAST(X_19!=REF(X_19,1)))+COUNT(X_29,BARSLAST(X_19!=REF(X_19,1)))>2 AND COUNT(HIGH>REF(X_19,BARSLAST(X_19!=REF(X_19,1))),BARSLAST(X_19!=REF(X_19,1)))=0 AND LOW=LLV(LOW,BARSLAST(X_19!=REF(X_19,1))) AND BARSLAST(X_19!=REF(X_19,1))>0;X_37:=SUMBARS(X_19!=REF(X_19,1),2)-COUNT(X_22,SUMBARS(X_19!=REF(X_19,1),2))+COUNT(X_29,SUMBARS(X_19!=REF(X_19,1),2))>3 AND LOW=LLV(LOW,SUMBARS(X_19!=REF(X_19,1),2)) AND REF(X_19,SUMBARS(X_19!=REF(X_19,1),2)-1)>=HHV(HIGH,SUMBARS(X_19!=REF(X_19,1),2));X_38:=SUMBARS(X_19!=REF(X_19,1),3)-COUNT(X_22,SUMBARS(X_19!=REF(X_19,1),3))+COUNT(X_29,SUMBARS(X_19!=REF(X_19,1),3))>3 AND LOW=LLV(LOW,SUMBARS(X_19!=REF(X_19,1),3)) AND REF(X_19,SUMBARS(X_19!=REF(X_19,1),3)-1)>=HHV(HIGH,SUMBARS(X_19!=REF(X_19,1),3));X_39:=SUMBARS(X_19!=REF(X_19,1),4)-COUNT(X_22,SUMBARS(X_19!=REF(X_19,1),4))+COUNT(X_29,SUMBARS(X_19!=REF(X_19,1),4))>3 AND LOW=LLV(LOW,SUMBARS(X_19!=REF(X_19,1),4)) AND REF(X_19,SUMBARS(X_19!=REF(X_19,1),4)-1)>=HHV(HIGH,SUMBARS(X_19!=REF(X_19,1),4));X_40:=SUMBARS(X_19!=REF(X_19,1),5)-COUNT(X_22,SUMBARS(X_19!=REF(X_19,1),5))+COUNT(X_29,SUMBARS(X_19!=REF(X_19,1),5))>3 AND LOW=LLV(LOW,SUMBARS(X_19!=REF(X_19,1),5)) AND REF(X_19,SUMBARS(X_19!=REF(X_19,1),5)-1)>=HHV(HIGH,SUMBARS(X_19!=REF(X_19,1),5));X_41:=SUMBARS(X_19!=REF(X_19,1),6)-COUNT(X_22,SUMBARS(X_19!=REF(X_19,1),6))+COUNT(X_29,SUMBARS(X_19!=REF(X_19,1),6))>3 AND LOW=LLV(LOW,SUMBARS(X_19!=REF(X_19,1),6)) AND REF(X_19,SUMBARS(X_19!=REF(X_19,1),6)-1)>=HHV(HIGH,SUMBARS(X_19!=REF(X_19,1),6));X_42:=X_30 OR X_31 OR X_32 OR X_33 OR X_34 OR X_35;X_43:=X_36 OR X_37 OR X_38 OR X_39 OR X_40 OR X_41;X_44:=X_42 AND COUNT(X_42,1+BARSLAST(X_43))=1;X_45:=X_43 AND COUNT(X_43,1+BARSLAST(X_42))=1;X_46:=IF(X_44,LLV(LOW,1+BARSLAST(X_45)),0);X_47:=IF(X_46,X_46,REF(X_46,BARSLAST(X_46)));X_48:=IF(X_45,HHV(HIGH,1+BARSLAST(X_44)),0);X_49:=IF(X_48,X_48,REF(X_48,BARSLAST(X_48)));X_50:=HHV(HIGH,1+BARSLAST(X_46))=HIGH;X_51:=LLV(LOW,1+BARSLAST(X_48))=LOW;X_52:=FILTERX(X_50,BARSLAST(X_51));X_53:=FILTERX(X_51,BARSLAST(X_50));X_54:=IF(X_53,LOW,0);X_55:=IF(X_52,HIGH,0);X_56:=IF(X_54>0,X_54,REF(X_54,BARSLAST(X_54>0)));X_57:=IF(X_55>0,X_55,REF(X_55,BARSLAST(X_55>0)));X_58:=BARSLAST(X_53)-COUNT(X_22,BARSLAST(X_53))+COUNT(X_29,BARSLAST(X_53))>3 AND COUNT(LOW0;X_59:=BARSLAST(X_52)-COUNT(X_22,BARSLAST(X_52))+COUNT(X_29,BARSLAST(X_52))>3 AND COUNT(HIGH>REF(X_57,BARSLAST(X_52)),BARSLAST(X_52))=0 AND LOW=LLV(LOW,BARSLAST(X_52)) AND BARSLAST(X_52)>0;X_60:=FILTERX(X_58,BARSLAST(X_59));X_61:=FILTERX(X_59,BARSLAST(X_58));X_62:=IF(X_61,LOW,0);X_63:=IF(X_60,HIGH,0);X_64:=IF(X_62>0,X_62,REF(X_62,BARSLAST(X_62>0)));X_65:=IF(X_63>0,X_63,REF(X_63,BARSLAST(X_63>0)));X_66:=LLV(LOW,1+BARSLAST(X_64!=REF(X_64,1) OR (X_62>0 AND X_64=REF(X_64,1))))=LOW AND COUNT(X_65!=REF(X_65,1),BARSLAST(X_64!=REF(X_64,1) OR (X_62>0 AND X_64=REF(X_64,1))))=0;X_67:=HHV(HIGH,1+BARSLAST(X_65!=REF(X_65,1) OR (X_63>0 AND X_65=REF(X_65,1))))=HIGH AND COUNT(X_64!=REF(X_64,1),BARSLAST(X_65!=REF(X_65,1) OR (X_63>0 AND X_65=REF(X_65,1))))=0;X_68:=FILTERX(X_67,BARSLAST(X_66));X_69:=FILTERX(X_66,BARSLAST(X_67));X_70:=IF(X_69,LOW,0);X_71:=IF(X_68,HIGH,0);X_72:=IF(X_70>0,X_70,REF(X_70,BARSLAST(X_70>0)));X_73:=IF(X_71>0,X_71,REF(X_71,BARSLAST(X_71>0)));X_74:=IF(X_72>REF(X_72,1),X_73,REF(X_73,BARSLAST(X_72>REF(X_72,1))));X_75:=IF(X_73X_74 AND COUNT(HIGH>X_74,BARSLAST(LOW
X_191:=X_127 AND COUNT(X_127,BARSLAST(X_189))=1 AND BARSLAST(X_189)>0;
X_192:=X_133 OR X_136 OR X_140 OR X_144 OR X_148 OR X_152 OR X_156 OR X_160 OR X_166 OR X_170 OR X_174 OR X_178 OR X_182 OR X_186 OR X_190;
笂2:IF(X_192>0,X_123,REF(X_123,BARSLAST(X_192>0))),DOTLINE,COLORLIRED;
笅2:IF(X_192>0,X_124,REF(X_124,BARSLAST(X_192>0))),DOTLINE,COLORLIRED;
X_193:=(1-笅2)/2+笅2;
X_194:=BARSLAST(X_192);X_195:=BacKSET(X_194=0,SUMBARS(X_71>0,2)-1);
DRAWLINE(crOSS(X_195,0.5),REFX(X_125,BARSNEXT(X_192)),X_192,X_125,0),COLORRED,LINETHICK2;
DRAWLINE(CROSS(X_195,0.5),REFX(X_126,BARSNEXT(X_192)),X_192,X_126,0),COLORRED,LINETHICK2;
DRAWLINE(CROSS(X_195,0.5),(REFX(X_125,BARSNEXT(X_192))-REFX(X_126,BARSNEXT(X_192)))/2+REFX(X_126,BARSNEXT(X_192)),X_192,(REFX(X_125,BARSNEXT(X_192))-REFX(X_126,BARSNEXT(X_192)))/2+REFX(X_126,BARSNEXT(X_192)),0),COLORRED,LINETHICK2;STICKLINE(CROSS(X_195,0.5),REFX(X_125,BARSNEXT(X_192)),REFX(X_126,BARSNEXT(X_192)),0,0),COLORRED,LINETHICK2;STICKLINE(X_192,X_125,X_126,0,0),COLORRED,LINETHICK2;
X_196:=X_137 OR X_137 OR X_141 OR X_145 OR X_149 OR X_153 OR X_157 OR X_161 OR X_163 OR X_167 OR X_171 OR X_175 OR X_179 OR X_183 OR X_187 OR X_191;
笂1:IF(X_196,X_128,REF(X_128,BARSLAST(X_196))),DOTLINE,COLORLIBLUE;
笅1:IF(X_196,X_129,REF(X_129,BARSLAST(X_196))),DOTLINE,COLORLIBLUE;
X_197:=(笂1-笅1)/2+笅1;
X_198:=BARSLAST(X_196);
X_199:=BACKSET(X_198=0,SUMBARS(X_70>0,2)-1);
DRAWLINE(CROSS(X_199,0.5),REFX(X_130,BARSNEXT(X_196)),X_196,X_130,0),COLORLIGREEN,LINETHICK2;
DRAWLINE(CROSS(X_199,0.5),REFX(X_131,BARSNEXT(X_196)),X_196,X_131,0),COLORLIGREEN,LINETHICK2;
DRAWLINE(CROSS(X_199,0.5),(REFX(X_130,BARSNEXT(X_196))-REFX(X_131,BARSNEXT(X_196)))/2+REFX(X_131,BARSNEXT(X_196)),X_196,(REFX(X_130,BARSNEXT(X_196))-REFX(X_131,BARSNEXT(X_196)))/2+REFX(X_131,BARSNEXT(X_196)),0),COLORLIGREEN,LINETHICK2;
STICKLINE(CROSS(X_199,0.5),REFX(X_130,BARSNEXT(X_196)),REFX(X_131,BARSNEXT(X_196)),0,0),COLORLIGREEN,LINETHICK2;STICKLINE(X_196,X_130,X_131,0,0),COLORLIGREEN,LINETHICK2;
X_200:=HHV(HIGH,1+BARSLAST(X_16))=HIGH;
X_201:=LLV(LOW,1+BARSLAST(X_18))=LOW;
X_202:=FILTERX(X_200,BARSLAST(X_201));
X_203:=FILTERX(X_201,BARSLAST(X_200));
X_204:=IF(X_203,LOW,0);X_205:=IF(X_202,HIGH,0);
X_206:=IF(X_204>0,X_204,REF(X_204,BARSLAST(X_204>0)));
X_207:=IF(X_205>0,X_205,REF(X_205,BARSLAST(X_205>0)));
DRAWLINE(X_71,HIGH,X_70,LOW,0),COLORGREEN,LINETHICK2;
DRAWLINE(X_70,LOW,X_71,HIGH,0),COLORRED,LINETHICK2;
X_208:=X_132 OR X_134 OR X_138 OR X_142 OR X_146 OR X_150 OR X_154 OR X_158 OR X_164 OR X_168 OR X_172 OR X_176 OR X_180 OR X_184 OR X_188;
X_209:=X_135 OR X_139 OR X_143 OR X_147 OR X_151 OR X_155 OR X_159 OR X_162 OR X_165 OR X_169 OR X_173 OR X_177 OR X_181 OR X_185 OR X_189;
X_210:=X_208 AND COUNT(X_208,BARSLAST(X_209))=1;
X_211:=X_209 AND COUNT(X_209,BARSLAST(X_208))=1;
X_212:=IF(X_210,LLV(X_72,1+BARSLAST(X_211)),0);
X_213:=IF(X_212,X_212,REF(X_212,BARSLAST(X_212)));
X_214:=IF(X_211,HHV(X_73,1+BARSLAST(X_210)),0);
X_215:=IF(X_214,X_214,REF(X_214,BARSLAST(X_214)));
DRAWICON(X_208,LOW,1);
DRAWICON(X_209,HIGH,2);
X_216:=1+COUNT(X_206REF(X_206,1)));
X_217:=1+COUNT(X_207>REF(X_207,1),1+BARSLAST(X_207DRAWNUMBER(X_206DRAWNUMBER(X_206>REF(X_206,1),LOW,1),NODRAW,COLORGREEN;
DRAWNUMBER(X_207>REF(X_207,1),HIGH+(SUM(HIGH-LOW,5)-HHV(HIGH-LOW,5))/8,X_217),NODRAW,COLORRED;
DRAWNUMBER(X_207DRAWTEXT(CROSS(zig(3,8),REF(ZIG(3,8),1)),LOW*0.978,'波段底'),LINETHICK2,COLORLIGRAY;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.02,'波段顶'),LINETHICK2,COLORLIGRAY;
趋势线:EMA(EMA(EMA(EMA(EMA(CLOSE,55),2),2),2),2),LINETHICK1,COLORFF00FF;