通达信长短趋势主图 主图指标公式源码
X_1:=STRCAT(5388,STRCAT(STRCAT(STRCAT(5389,HYBLOCK),STRCAT(5390,DYBLOCK)),STRCAT(5391,GNBLOCK)));
X_2:=REF(CLOSE,1);
X_4:=CLOSE>=X_3 AND CLOSE=HIGH;
X_5:=IF(DTPRICE(REF(CLOSE,1),0.1)=CLOSE,2,0);
X_6:=LOW<REF(LOW,1) AND HIGH<REF(HIGH,1);
X_8:=LOW<REF(LOW,1) AND HIGH>=REF(HIGH,1) AND REF(LOW,1)>=REF(LOW,2) AND REF(HIGH,1)<=REF(HIGH,2) AND HIGH<REF(HIGH,2) AND COUNT(X_6,BARSLAST(X_7))=0;
X_10:=HIGH<REF(HIGH,1) AND REF(LOW,1)<=REF(LOW,2) AND REF(HIGH,1)>=REF(HIGH,2) AND LOW<REF(LOW,2) AND COUNT(X_6,BARSLAST(X_7))=0;
X_12:=X_6 OR X_8 OR X_10;
X_14:=X_13 AND COUNT(X_13,BARSLAST(X_12))=1;
X_16:=IF(X_14,LLV(LOW,1+BARSLAST(X_15)),0);
X_18:=IF(X_15,HHV(HIGH,1+BARSLAST(X_14)),0);
X_20:=HIGH>=REF(HIGH,1) AND LOW<=REF(LOW,1);
X_22:=X_20 OR X_21;
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_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_28:=X_26 OR X_27 AND (COUNT(X_14,BARSLAST(X_15))=0 OR X_14);
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(LOW<REF(X_17,BARSLAST(X_17!=REF(X_17,1))),BARSLAST(X_17!=REF(X_17,1)))=0 AND BARSLAST(X_17!=REF(X_17,1))>0;
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_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_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_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_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_42:=X_30 OR X_31 OR X_32 OR X_33 OR X_34 OR X_35;
X_44:=X_42 AND COUNT(X_42,1+BARSLAST(X_43))=1;
X_46:=IF(X_44,LLV(LOW,1+BARSLAST(X_45)),0);
X_48:=IF(X_45,HHV(HIGH,1+BARSLAST(X_44)),0);
X_50:=HHV(HIGH,1+BARSLAST(X_46))=HIGH;
X_52:=FILTERX(X_50,BARSLAST(X_51));
X_54:=IF(X_53,LOW,0);
X_56:=IF(X_54>0,X_54,REF(X_54,BARSLAST(X_54>0)));
X_58:=BARSLAST(X_53)-COUNT(X_22,BARSLAST(X_53))+COUNT(X_29,BARSLAST(X_53))>3 AND COUNT(LOW<REF(X_56,BARSLAST(X_53)),BARSLAST(X_53))=0 AND HIGH=HHV(HIGH,1+BARSLAST(X_53)) AND BARSLAST(X_53)>0;
X_60:=FILTERX(X_58,BARSLAST(X_59));
X_62:=IF(X_61,LOW,0);
X_64:=IF(X_62>0,X_62,REF(X_62,BARSLAST(X_62>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_68:=FILTERX(X_67,BARSLAST(X_66));
X_70:=IF(X_69,LOW,0);
X_72:=IF(X_70>0,X_70,REF(X_70,BARSLAST(X_70>0)));
X_74:=IF(X_72>REF(X_72,1),X_73,REF(X_73,BARSLAST(X_72>REF(X_72,1))));
X_76:=HIGH>X_74 AND COUNT(HIGH>X_74,BARSLAST(LOW<X_75))=1 AND BARSLAST(X_72>REF(X_72,1))<BARSLAST(X_73>REF(X_73,1));
X_78:=IF(X_76,LLV(LOW,1+BARSLAST(X_77)),0);
X_80:=IF(X_77,HHV(HIGH,1+BARSLAST(X_76)),0);
X_82:=HHV(HIGH,1+BARSLAST(X_78))=HIGH;
X_84:=FILTERX(X_82,BARSLAST(X_83));
X_86:=IF(X_85,LOW,0);
X_88:=IF(X_86>0,X_86,REF(X_86,BARSLAST(X_86>0)));
X_90:=IF(X_88>REF(X_88,1),X_89,REF(X_89,BARSLAST(X_88>REF(X_88,1))));
X_92:=HIGH>X_90 AND COUNT(HIGH>X_90,BARSLAST(LOW<X_91))=1;
X_94:=IF(X_92,LLV(LOW,1+BARSLAST(X_93)),0);
X_96:=IF(X_93,HHV(HIGH,1+BARSLAST(X_92)),0);
X_98:=HHV(HIGH,1+BARSLAST(X_94))=HIGH;
X_100:=FILTERX(X_98,BARSLAST(X_99));
X_102:=IF(X_101,LOW,0);
X_104:=IF(X_102>0,X_102,REF(X_102,BARSLAST(X_102>0)));
X_106:=IF(X_104>REF(X_104,1),X_105,REF(X_105,BARSLAST(X_104>REF(X_104,1))));
X_108:=HIGH>X_106 AND COUNT(HIGH>X_106,BARSLAST(LOW<X_107))=1;
X_110:=IF(X_108,LLV(LOW,1+BARSLAST(X_109)),0);
X_112:=IF(X_109,HHV(HIGH,1+BARSLAST(X_108)),0);
X_114:=HHV(HIGH,1+BARSLAST(X_110))=HIGH;
X_116:=FILTERX(X_114,BARSLAST(X_115));
X_118:=IF(X_117,LOW,0);
X_120:=IF(X_118>0,X_118,REF(X_118,BARSLAST(X_118>0)));
X_122:=X_72!=REF(X_72,1) AND X_72<=REF(X_73,1+BARSLAST(X_73!=REF(X_73,1)));
X_124:=MAX(REF(X_72,1+BARSLAST(X_72!=REF(X_72,1))),REF(X_72,BARSLAST(X_72!=REF(X_72,1))));
X_126:=IF(X_122,X_124,REF(X_124,BARSLAST(X_122)));
X_128:=MIN(REF(X_73,1+BARSLAST(X_73!=REF(X_73,1))),REF(X_73,BARSLAST(X_73!=REF(X_73,1))));
X_130:=IF(X_127,X_128,REF(X_128,BARSLAST(X_127)));
X_133:=X_122 AND COUNT(X_122,BARSLAST(X_132))=1; X_134:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_133)) AND COUNT(X_73<X_126,BARSLAST(X_133))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_133)),BARSLAST(X_133))=1; X_135:=X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_133)) AND COUNT(X_72>X_125,BARSLAST(X_133))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_133)),BARSLAST(X_133))=1;
X_138:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_136)) AND COUNT(X_73<X_126,BARSLAST(X_136))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_136)),BARSLAST(X_136))=1;
X_142:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_140)) AND COUNT(X_73<X_126,BARSLAST(X_140))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_140)),BARSLAST(X_140))=1; X_143:=X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_140)) AND COUNT(X_72>X_125,BARSLAST(X_140))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_140)),BARSLAST(X_140))=1;
X_146:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_144)) AND COUNT(X_73<X_126,BARSLAST(X_144))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_144)),BARSLAST(X_144))=1;
X_148:=X_122 AND COUNT(X_122,BARSLAST(X_146))=1 AND BARSLAST(X_146)>0;
X_150:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_148)) AND COUNT(X_73<X_126,BARSLAST(X_148))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_148)),BARSLAST(X_148))=1;
X_152:=X_122 AND COUNT(X_122,BARSLAST(X_150))=1 AND BARSLAST(X_150)>0; X_153:=X_127 AND COUNT(X_127,BARSLAST(X_151))=1 AND BARSLAST(X_151)>0;
X_155:=X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_152)) AND COUNT(X_72>X_125,BARSLAST(X_152))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_126,BARSLAST(X_152)),BARSLAST(X_152))=1;
X_158:=X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_156)) AND COUNT(X_73<X_126,BARSLAST(X_156))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_125,BARSLAST(X_156)),BARSLAST(X_156))=1;
X_160:=X_122 AND COUNT(X_122,BARSLAST(X_158))=1 AND BARSLAST(X_158)>0; X_161:=X_127 AND COUNT(X_127,BARSLAST(X_159))=1 AND BARSLAST(X_159)>0;
X_164:=X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_163)) AND COUNT(X_73<X_131,BARSLAST(X_163))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_163)),BARSLAST(X_163))=1;
X_166:=X_122 AND COUNT(X_122,BARSLAST(X_164))=1 AND BARSLAST(X_164)>0; X_167:=X_127 AND COUNT(X_127,BARSLAST(X_165))=1 AND BARSLAST(X_165)>0;
X_169:=X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_167)) AND COUNT(X_72>X_130,BARSLAST(X_167))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_167)),BARSLAST(X_167))=1;
X_172:=X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_171)) AND COUNT(X_73<X_131,BARSLAST(X_171))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_171)),BARSLAST(X_171))=1;
X_174:=X_122 AND COUNT(X_122,BARSLAST(X_172))=1 AND BARSLAST(X_172)>0; X_175:=X_127 AND COUNT(X_127,BARSLAST(X_173))=1 AND BARSLAST(X_173)>0;
X_177:=X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_175)) AND COUNT(X_72>X_130,BARSLAST(X_175))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_175)),BARSLAST(X_175))=1;
X_180:=X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_179)) AND COUNT(X_73<X_131,BARSLAST(X_179))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_179)),BARSLAST(X_179))=1;
X_182:=X_122 AND COUNT(X_122,BARSLAST(X_180))=1 AND BARSLAST(X_180)>0; X_183:=X_127 AND COUNT(X_127,BARSLAST(X_181))=1 AND BARSLAST(X_181)>0;
X_185:=X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_183)) AND COUNT(X_72>X_130,BARSLAST(X_183))=0 AND COUNT(X_73<REF(X_73,1) AND X_73<REF(X_131,BARSLAST(X_183)),BARSLAST(X_183))=1;
X_188:=X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_187)) AND COUNT(X_73<X_131,BARSLAST(X_187))=0 AND COUNT(X_72>REF(X_72,1) AND X_72>REF(X_130,BARSLAST(X_187)),BARSLAST(X_187))=1;
X_190:=X_122 AND COUNT(X_122,BARSLAST(X_188))=1 AND BARSLAST(X_188)>0; X_191:=X_127 AND COUNT(X_127,BARSLAST(X_189))=1 AND BARSLAST(X_189)>0;
上中枢下1:IF(X_192>0,X_124,REF(X_124,BARSLAST(X_192>0))),DOTLINE,COLORLIRED; X_193:=(上中枢上1-上中枢下1)/2+上中枢下1; X_194:=BARSLAST(X_192);
DRAWLINE(CROSS(X_195,0.5),REFX(X_126,BARSNEXT(X_192)),X_192,X_126,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_129,REF(X_129,BARSLAST(X_196))),DOTLINE,COLORLIBLUE; X_197:=(下中枢上1-下中枢下1)/2+下中枢下1; X_198:=BARSLAST(X_196);DRAWTEXT_FIX(C>O,0.01,0.05,0,'齐家缠学'),COLORWHITE;
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(X_196,X_130,X_131,0,0),COLORLIGREEN,LINETHICK2;}; X_200:=HHV(HIGH,1+BARSLAST(X_16))=HIGH;
X_202:=FILTERX(X_200,BARSLAST(X_201)); X_203:=FILTERX(X_201,BARSLAST(X_200)); X_204:=IF(X_203,LOW,0);
X_207:=IF(X_205>0,X_205,REF(X_205,BARSLAST(X_205>0))); DRAWLINE(X_205,HIGH,X_204,LOW,0),COLORWHITE;
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_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_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_217:=1+COUNT(X_207>REF(X_207,1),1+BARSLAST(X_207<REF(X_207,1))); DRAWNUMBER(X_206<REF(X_206,1),LOW,X_216),NODRAW,COLORGREEN;
DRAWNUMBER(X_207>REF(X_207,1),HIGH+(SUM(HIGH-LOW,5)-HHV(HIGH-LOW,5))/8,X_217),NODRAW,COLORRED;
未来函数检测结果如下:
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:STRCAT(5388,STRCAT(STRCAT(STRCAT(5389,HYBLOCK),STRCAT(5390,DYBLOCK)),STRCAT(5391,GNBLOCK)))
X_2赋值:1日前的收盘价
X_4赋值:收盘价>=X_3 AND 收盘价=最高价
X_5赋值:IF(DTPRICE(1日前的收盘价,0.1)=收盘价,2,0)
X_6赋值:最低价<1日前的最低价 AND 最高价<1日前的最高价
X_8赋值:最低价<1日前的最低价 AND 最高价>=1日前的最高价 AND 1日前的最低价>=2日前的最低价 AND 1日前的最高价<=2日前的最高价 AND 最高价<2日前的最高价 AND COUNT(X_6,上次X_7距今天数)=0
X_10:=最高价<1日前的最高价 AND 1日前的最低价<=2日前的最低价 AND 1日前的最高价>=2日前的最高价 AND 最低价<2日前的最低价 AND COUNT(X_6,上次X_7距今天数)=0
X_12:=X_6 OR X_8 OR X_10
X_14:=X_13 AND COUNT(X_13,上次X_12距今天数)=1
X_16:=IF(X_14,LLV(最低价,1+上次X_15距今天数),0)
X_18:=IF(X_15,HHV(最高价,1+上次X_14距今天数),0)
X_20:=最高价>=1日前的最高价 AND 最低价<=1日前的最低价
X_22:=X_20 OR X_21
X_24:=最高价<=1日前的最高价 AND 最低价>=1日前的最低价 AND 1日前的最高价>=2日前的最高价 AND 1日前的最低价<=2日前的最低价 AND 最低价<=2日前的最低价
X_26:=最高价>=1日前的最高价 AND 最低价<=1日前的最低价 AND 1日前的最高价<=2日前的最高价 AND 1日前的最低价>=2日前的最低价 AND 最低价>=2日前的最低价
X_28:=X_26 OR X_27 AND (COUNT(X_14,上次X_15距今天数)=0 OR X_14)
X_30赋值:上次X_17!=1日前的X_17距今天数-COUNT(X_22,上次X_17!=1日前的X_17距今天数)+COUNT(X_29,上次X_17!=1日前的X_17距今天数)>2 AND 最高价=HHV(最高价,1+上次X_17!=1日前的X_17距今天数) AND COUNT(最低价[0]
X_32赋值:SUMBARS(X_17!=1日前的X_17,3)-COUNT(X_22,SUMBARS(X_17!=1日前的X_17,3))+COUNT(X_29,SUMBARS(X_17!=1日前的X_17,3))>3 AND 最高价=HHV(最高价,SUMBARS(X_17!=1日前的X_17,3)) AND REF(X_17,SUMBARS(X_17!=1日前的X_17,3)-1)<=LLV(最低价,SUMBARS(X_17!=1日前的X_17,3))
X_34赋值:SUMBARS(X_17!=1日前的X_17,5)-COUNT(X_22,SUMBARS(X_17!=1日前的X_17,5))+COUNT(X_29,SUMBARS(X_17!=1日前的X_17,5))>3 AND 最高价=HHV(最高价,SUMBARS(X_17!=1日前的X_17,5)) AND REF(X_17,SUMBARS(X_17!=1日前的X_17,5)-1)<=LLV(最低价,SUMBARS(X_17!=1日前的X_17,5))
X_36赋值:上次X_19!=1日前的X_19距今天数-COUNT(X_22,上次X_19!=1日前的X_19距今天数)+COUNT(X_29,上次X_19!=1日前的X_19距今天数)>2 AND COUNT(最高价>REF(X_19,上次X_19!=1日前的X_19距今天数),上次X_19!=1日前的X_19距今天数)=0 AND 最低价=LLV(最低价,上次X_19!=1日前的X_19距今天数) AND 上次X_19!=1日前的X_19距今天数>0
X_38赋值:SUMBARS(X_19!=1日前的X_19,3)-COUNT(X_22,SUMBARS(X_19!=1日前的X_19,3))+COUNT(X_29,SUMBARS(X_19!=1日前的X_19,3))>3 AND 最低价=LLV(最低价,SUMBARS(X_19!=1日前的X_19,3)) AND REF(X_19,SUMBARS(X_19!=1日前的X_19,3)-1)>=HHV(最高价,SUMBARS(X_19!=1日前的X_19,3))
X_40:=SUMBARS(X_19!=1日前的X_19,5)-COUNT(X_22,SUMBARS(X_19!=1日前的X_19,5))+COUNT(X_29,SUMBARS(X_19!=1日前的X_19,5))>3 AND 最低价=LLV(最低价,SUMBARS(X_19!=1日前的X_19,5)) AND REF(X_19,SUMBARS(X_19!=1日前的X_19,5)-1)>=HHV(最高价,SUMBARS(X_19!=1日前的X_19,5))
X_42:=X_30 OR X_31 OR X_32 OR X_33 OR X_34 OR X_35
X_44:=X_42 AND COUNT(X_42,1+上次X_43距今天数)=1
X_46:=IF(X_44,LLV(最低价,1+上次X_45距今天数),0)
X_48:=IF(X_45,HHV(最高价,1+上次X_44距今天数),0)
X_50:=HHV(最高价,1+上次X_46距今天数)=最高价
X_52:=FILTERX(X_50,上次X_51距今天数)
如果X_53返回最低价否则返回0
X_56:=IF(X_54>0,X_54,REF(X_54,上次X_54>0距今天数))
X_58:=上次X_53距今天数-COUNT(X_22,上次X_53距今天数)+COUNT(X_29,上次X_53距今天数)>3 AND COUNT(最低价[0]
X_60:=FILTERX(X_58,上次X_59距今天数)
如果X_61返回最低价否则返回0
X_64:=IF(X_62>0,X_62,REF(X_62,上次X_62>0距今天数))
X_66:=LLV(最低价,1+上次X_64!=1日前的X_64 OR (X_62>0 AND X_64=1日前的X_64距今天数))=最低价 AND COUNT(X_65!=1日前的X_65,上次X_64!=1日前的X_64 OR (X_62>0 AND X_64=1日前的X_64距今天数))=0
X_68:=FILTERX(X_67,上次X_66距今天数)
如果X_69返回最低价否则返回0
X_72赋值:IF(X_70>0,X_70,REF(X_70,上次X_70>0距今天数))
X_74赋值:IF(X_72>1日前的X_72,X_73,REF(X_73,上次X_72>1日前的X_72距今天数))
X_76赋值:最高价>X_74 AND COUNT(最高价>X_74,上次最低价1日前的X_72)1日前的X_73)
X_78赋值:IF(X_76,LLV(最低价,1+上次X_77距今天数),0)
X_80:=IF(X_77,HHV(最高价,1+上次X_76距今天数),0)
X_82:=HHV(最高价,1+上次X_78距今天数)=最高价
X_84:=FILTERX(X_82,上次X_83距今天数)
如果X_85返回最低价否则返回0
X_88:=IF(X_86>0,X_86,REF(X_86,上次X_86>0距今天数))
X_90赋值:IF(X_88>1日前的X_88,X_89,REF(X_89,上次X_88>1日前的X_88距今天数))
X_92赋值:最高价>X_90 AND COUNT(最高价>X_90,上次最低价
X_94赋值:IF(X_92,LLV(最低价,1+上次X_93距今天数),0)
X_96赋值:IF(X_93,HHV(最高价,1+上次X_92距今天数),0)
X_98赋值:HHV(最高价,1+上次X_94距今天数)=最高价
X_100:=FILTERX(X_98,上次X_99距今天数)
如果X_101返回最低价否则返回0
X_104:=IF(X_102>0,X_102,REF(X_102,上次X_102>0距今天数))
X_106:=IF(X_104>1日前的X_104,X_105,REF(X_105,上次X_104>1日前的X_104距今天数))
X_108:=最高价>X_106 AND COUNT(最高价>X_106,上次最低价
X_110:=IF(X_108,LLV(最低价,1+上次X_109距今天数),0)
X_112:=IF(X_109,HHV(最高价,1+上次X_108距今天数),0)
X_114:=HHV(最高价,1+上次X_110距今天数)=最高价
X_116:=FILTERX(X_114,上次X_115距今天数)
如果X_117返回最低价否则返回0
X_120:=IF(X_118>0,X_118,REF(X_118,上次X_118>0距今天数))
X_122:=X_72!=1日前的X_72 AND X_72<=REF(X_73,1+上次X_73!=REF(X_73,1距今天数))
X_124:=MAX(REF(X_72,1+上次X_72!=REF(X_72,1距今天数)),REF(X_72,上次X_72!=REF(X_72,1距今天数)))
X_126:=IF(X_122,X_124,REF(X_124,上次X_122距今天数))
X_128:=MIN(REF(X_73,1+上次X_73!=REF(X_73,1距今天数)),REF(X_73,上次X_73!=REF(X_73,1距今天数)))
X_130:=IF(X_127,X_128,REF(X_128,上次X_127距今天数))
X_133:=X_122 AND COUNT(X_122,上次X_132距今天数)=1
X_134:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_133距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_133距今天数),上次X_133距今天数)=1
X_135:=X_73<1日前的X_73 AND X_73[X_125,上次X_133距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_138:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_136距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_136距今天数),上次X_136距今天数)=1]
X_142:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_140距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_140距今天数),上次X_140距今天数)=1
X_143:=X_73<1日前的X_73 AND X_73[X_125,上次X_140距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_146:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_144距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_144距今天数),上次X_144距今天数)=1]
X_148:=X_122 AND COUNT(X_122,上次X_146距今天数)=1 AND 上次X_146距今天数>0
X_150:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_148距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_148距今天数),上次X_148距今天数)=1
X_152:=X_122 AND COUNT(X_122,上次X_150距今天数)=1 AND 上次X_150距今天数>0
X_153:=X_127 AND COUNT(X_127,上次X_151距今天数)=1 AND 上次X_151距今天数>0
X_155:=X_73<1日前的X_73 AND X_73[X_125,上次X_152距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_158:=X_72>1日前的X_72 AND X_72>REF(X_125,上次X_156距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_125,上次X_156距今天数),上次X_156距今天数)=1]
X_160:=X_122 AND COUNT(X_122,上次X_158距今天数)=1 AND 上次X_158距今天数>0
X_161:=X_127 AND COUNT(X_127,上次X_159距今天数)=1 AND 上次X_159距今天数>0
X_164:=X_72>1日前的X_72 AND X_72>REF(X_130,上次X_163距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_130,上次X_163距今天数),上次X_163距今天数)=1
X_166:=X_122 AND COUNT(X_122,上次X_164距今天数)=1 AND 上次X_164距今天数>0
X_167:=X_127 AND COUNT(X_127,上次X_165距今天数)=1 AND 上次X_165距今天数>0
X_169:=X_73<1日前的X_73 AND X_73[X_130,上次X_167距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_172:=X_72>1日前的X_72 AND X_72>REF(X_130,上次X_171距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_130,上次X_171距今天数),上次X_171距今天数)=1]
X_174:=X_122 AND COUNT(X_122,上次X_172距今天数)=1 AND 上次X_172距今天数>0
X_175:=X_127 AND COUNT(X_127,上次X_173距今天数)=1 AND 上次X_173距今天数>0
X_177:=X_73<1日前的X_73 AND X_73[X_130,上次X_175距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_180:=X_72>1日前的X_72 AND X_72>REF(X_130,上次X_179距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_130,上次X_179距今天数),上次X_179距今天数)=1]
X_182:=X_122 AND COUNT(X_122,上次X_180距今天数)=1 AND 上次X_180距今天数>0
X_183:=X_127 AND COUNT(X_127,上次X_181距今天数)=1 AND 上次X_181距今天数>0
X_185:=X_73<1日前的X_73 AND X_73[X_130,上次X_183距今天数)=0 AND COUNT(X_73<1日前的X_73 AND X_73][
X_188:=X_72>1日前的X_72 AND X_72>REF(X_130,上次X_187距今天数) AND COUNT(X_731日前的X_72 AND X_72>REF(X_130,上次X_187距今天数),上次X_187距今天数)=1]
X_190:=X_122 AND COUNT(X_122,上次X_188距今天数)=1 AND 上次X_188距今天数>0
X_191:=X_127 AND COUNT(X_127,上次X_189距今天数)=1 AND 上次X_189距今天数>0
输出上中枢下1:IF(X_192>0,X_124,REF(X_124,上次X_192>0距今天数)),DOTLINE,COLORLIRED
X_193:=(上中枢上1-上中枢下1)/2+上中枢下1
X_194:=上次X_192距今天数
DRAWLINE(X_195上穿0.5,REFX(X_126,BARSNEXT(X_192)),X_192,X_126,0),画红色, 线宽为2
当满足条件X_192时,在X_125和X_126之间画柱状线
} {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_129,REF(X_129,上次X_196距今天数)),DOTLINE,COLORLIBLUE
X_197:=(下中枢上1-下中枢下1)/2+下中枢下1
X_198:=上次X_196距今天数
当满足条件C>O时,在横轴0.01纵轴0.05位置书写文字
DRAWLINE(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, 线宽为2
当满足条件X_196时,在X_130和X_131之间画柱状线
}
X_200:=HHV(最高价,1+上次X_16距今天数)=最高价
X_202:=FILTERX(X_200,上次X_201距今天数)
X_203:=FILTERX(X_201,上次X_200距今天数)
如果X_203返回最低价否则返回0
X_207:=IF(X_205>0,X_205,REF(X_205,上次X_205>0距今天数))
DRAWLINE(X_205,最高价,X_204,最低价,0),画白色
DRAWLINE(X_70,最低价,X_71,最高价,0),画红色, 线宽为2
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_210:=X_208 AND COUNT(X_208,上次X_209距今天数)=1
X_211:=X_209 AND COUNT(X_209,上次X_208距今天数)=1
X_212:=IF(X_210,LLV(X_72,1+上次X_211距今天数),0)
X_214:=IF(X_211,HHV(X_73,1+上次X_210距今天数),0)
X_215:=IF(X_214,X_214,REF(X_214,上次X_214距今天数))
当满足条件X_208时,在最低价和1之间画图标
当满足条件X_209时,在最高价和2之间画图标
X_217:=1+COUNT(X_207>1日前的X_207,1+上次X_207<1日前的X_207距今天数)
DRAWNUMBER(X_206<1日前的X_206,最低价,X_216),NODRAW,画绿色
DRAWNUMBER(X_207>1日前的X_207,最高价+(5的最高价-最低价日累和-5日内最高价-最低价最高值)/8,X_217),NODRAW,画红色