主图源码
参数1: 周期微调, 最小: 0, 最大: 10, 缺省: 5
参数2: 微调开关, 最小: 0, 最大: 1, 缺省: 1
参数3: 高位A, 最小: 0, 最大: 1000, 缺省: 0
参数4: 低位B, 最小: 0, 最大: 1000, 缺省: 0
参数5: 次高3买, 最小: 0, 最大: 1000, 缺省: 0
参数6: 后低3卖, 最小: 0, 最大: 1000, 缺省: 0
参数7: 手动开关, 最小: 0, 最大: 1, 缺省: 1
参数8: 趋势线开关, 最小: 0, 最大: 1, 缺省: 1
DRAWTEXT_FIX(1,0.85,0.001,1,3),COLORYELLOW;
DRAWTEXT_FIX(1,0.82,0.04,1,4),COLORYELLOW;
X_1:=BARSCOUNT(CLOSE);
X_2:=CONST(X_1);
X_3:=X_2-X_1;
K线根数:X_3+1,NODRAW,COLORYELLOW;
X_4:=REF(HIGH,周期微调)=HHV(HIGH,周期微调+1);
X_5:=FILTER(X_4,周期微调);
X_6:=BACKSET(X_5,周期微调+1);
X_7:=FILTER(X_6,周期微调);
X_8:=REF(LOW,周期微调)=LLV(LOW,周期微调+1);
X_9:=FILTER(X_8,周期微调);
X_10:=BACKSET(X_9,周期微调+1);
X_11:=FILTER(X_10,周期微调);
X_12:=(REF(LLV(LOW,周期微调),1)+REF(HHV(HIGH,周期微调),1))/2;
X_13:=(HIGH+LOW)/2;
X_14:=X_7 AND NOT(X_11 AND X_12>=X_13) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_15:=X_7 AND NOT(X_11 AND X_12>=X_13);
X_16:=X_11 AND NOT(X_7 AND X_12=X_13);
X_17:=REF(BARSLAST(X_14),1)+1;
X_18:=BACKSET(X_14 AND COUNT(X_16,X_17)>0,LLVBARS(IF(X_16,LOW,10000),X_17));
X_19:=X_18>REF(X_18,1);
X_20:=BACKSET(X_19,2);
X_21:=X_20>REF(X_20,1);
X_22:=X_21 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_23:=REF(BARSLAST(X_22),1)+1;
X_24:=BACKSET(X_22 AND COUNT(X_15,X_23)>0,HHVBARS(IF(X_15,HIGH,0),X_23));
X_25:=X_24>REF(X_24,1);
X_26:=BACKSET(X_25,2);
X_27:=X_26>REF(X_26,1);
X_28:=HIGH;
X_29:=REF(HIGH,REF(BARSLAST(X_27),1)+1)>REF(HIGH,REF(BARSLAST(X_27),1)+2+REF(BARSLAST(X_27),REF(BARSLAST(X_27),1)+2));
X_30:=X_28 AND X_29 AND X_27;
X_31:=BACKSET(X_30,REF(BARSLAST(X_27),1)+2);
X_32:=X_31>REF(X_31,1);
X_33:=LOW>REF(LOW,REF(BARSLAST(X_21),1)+1);
X_34:=REF(LOW,REF(BARSLAST(X_21),1)+1);
X_35:=X_33 AND X_34 AND X_21;
X_36:=BACKSET(X_35,REF(BARSLAST(X_21),1)+2);
X_37:=X_36>REF(X_36,1);
X_38:=X_32 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_39:=REF(BARSLAST(X_38),1)+1;
X_40:=BACKSET(X_38 AND COUNT(X_37,X_39)>0,LLVBARS(IF(X_37,LOW,POW(10,20)),X_39));
X_41:=X_40>REF(X_40,1);
X_42:=BACKSET(X_41,2);
X_43:=X_42>REF(X_42,1);
X_44:=X_43 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_45:=REF(BARSLAST(X_44),1)+1;
X_46:=BACKSET(X_44 AND COUNT(X_32,X_45)>0,HHVBARS(IF(X_32,HIGH,-POW(10,20)),X_45));
X_47:=X_46>REF(X_46,1);
X_48:=BACKSET(X_47,2);
X_49:=X_48>REF(X_48,1);
X_50:=BACKSET(ISLASTBAR,MIN(BARSLAST(X_49),BARSLAST(X_43))+1);
X_51:=X_50>REF(X_50,1);
X_52:=BACKSET(ISLASTBAR,BARSLAST(X_21)+1);
X_53:=X_52>REF(X_52,1);
X_54:=BACKSET(X_53,REF(BARSLAST(X_21),1)+2);
X_55:=X_54>REF(X_54,1);
X_56:=BACKSET(ISLASTBAR,BARSLAST(X_27)+1);
X_57:=X_56>REF(X_56,1);
X_58:=BACKSET(X_57,REF(BARSLAST(X_27),1)+2);
X_59:=X_58>REF(X_58,1);
IF(趋势线开关=1,DRAWLINE(X_21,LOW,X_27,HIGH,0),DRAWNULL),DOTLINE,COLORRED;
IF(趋势线开关=1,DRAWLINE(X_27,HIGH,X_21,LOW,0),DRAWNULL),DOTLINE,COLORGREEN;
X_60:=CURRBARSCOUNT;
DRAWNUMBER(趋势线开关=1 AND X_27,HIGH,X_60),COLORLIRED,LINETHICK9;
DRAWNUMBER(趋势线开关=1 AND X_21,LOW,X_60),COLORCYAN;
X_61:=BARSLAST(X_27);
X_62:=BARSLAST(X_21);
X_63:=BACKSET(ISLASTBAR,MIN(X_61,X_62)+1);
X_64:=X_63>REF(X_63,1);
高位价:IF(微调开关=1,REF(REF(HIGH,X_61),1),DRAWNULL),NODRAW,COLORRED;
低位价:IF(微调开关=1,REF(REF(LOW,X_62),1),DRAWNULL),NODRAW,COLORGREEN;
X_65:=高位价;
X_66:=低位价;
X_67:=DRAWNULL;
X_68:=IF(X_61<X_62,X_65,X_67);
X_69:=IF(LOW>=低位价,X_65,X_67);
X_70:=X_68 AND X_69;
X_71:=X_70;
X_72:=IFC(X_70,X_65,X_67);
X_73:=IFC(X_70,X_66,X_67);
X_74:=X_72/X_73;
X_75:=SQRT(SQRT(X_74));
X_76:=SQRT(X_74);
X_77:=X_76+X_75-1;
X_78:=X_72/X_75;
X_79:=X_72/X_76;
X_80:=X_72/X_77;
X_81:=REFDATE(HHV(HIGH,X_61+1),DATE);
X_82:=REFDATE(LLV(LOW,X_62+1),DATE);
X_83:=CONST(X_78);
X_84:=CONST(X_79);
X_85:=CONST(X_80);
买入C1:DRAWLINE(X_57,CONST(X_83),CURRBARSCOUNT=1,X_83,1),DOTLINE,COLORFF8800;
买入C2:DRAWLINE(X_57,CONST(X_84),CURRBARSCOUNT=1,X_84,1),DOTLINE,COLORFF8800;
买入C3:DRAWLINE(X_57,CONST(X_85),CURRBARSCOUNT=1,X_85,1),DOTLINE,COLORFF8800;
DRAWTEXT(X_57,X_83,VARCAT(5,VAR2STR(X_83,2))),COLORWHITE;
DRAWTEXT(X_57,X_84,VARCAT(6,VAR2STR(X_84,2))),COLORWHITE;
DRAWTEXT(X_57,X_85,VARCAT(7,VAR2STR(X_85,2))),COLORWHITE;
DRAWTEXT(X_53,LOW,VARCAT(8,VAR2STR(LOW,2))),COLORGREEN;
DRAWTEXT(X_57,HIGH,VARCAT(9,VAR2STR(HIGH,2))),COLORRED;
STICKLINE(X_57,HIGH,CONST(X_80),0,(-1)),COLORFF8800;
IFC(X_70,DRAWLINE(X_53,LOW,X_57,HIGH,0),DRAWNULL),COLORFF8800,LINETHICK3;
DRAWLINE(X_57,HIGH,CURRBARSCOUNT=1,CONST(X_80),0),DOTLINE,COLORFF8800;
X_86:=IF(微调开关=1,REF(REF(HIGH,X_61),1),DRAWNULL);
X_87:=IF(微调开关=1,REF(REF(LOW,X_62),1),DRAWNULL);
X_88:=X_86;
X_89:=X_87;
X_90:=DRAWNULL;
X_91:=X_86;
X_92:=X_87;
X_93:=IF(X_61>X_62,X_89,X_90);
X_94:=IF(HIGH<X_86,X_88,X_90);
X_95:=X_93 AND X_94;
X_96:=X_95;
X_97:=IFC(X_95,X_88,X_90);
X_98:=IFC(X_95,X_89,X_90);
X_99:=X_97/X_98;
X_100:=SQRT(SQRT(X_99));
X_101:=SQRT(X_99);
X_102:=X_101+X_100-1;
X_103:=X_98*X_100;
X_104:=X_98*X_101;
X_105:=X_98*X_102;
X_106:=CONST(X_103);
X_107:=CONST(X_104);
X_108:=CONST(X_105);
卖出C1:DRAWLINE(X_53,CONST(X_106),CURRBARSCOUNT=1,X_106,1),DOTLINE,COLORMAGENTA;
卖出C2:DRAWLINE(X_53,CONST(X_107),CURRBARSCOUNT=1,X_107,1),DOTLINE,COLORMAGENTA;
卖出C3:DRAWLINE(X_53,CONST(X_108),CURRBARSCOUNT=1,X_108,1),DOTLINE,COLORMAGENTA;
DRAWTEXT(X_53,X_106,VARCAT(10,VAR2STR(X_106,2))),COLORYELLOW;
DRAWTEXT(X_53,X_107,VARCAT(11,VAR2STR(X_107,2))),COLORYELLOW;
DRAWTEXT(X_53,X_108,VARCAT(12,VAR2STR(X_108,2))),COLORYELLOW;
DRAWLINE(X_53,LOW,CURRBARSCOUNT=1,CONST(X_105),0),DOTLINE,COLORMAGENTA;
STICKLINE(X_53,LOW,CONST(X_105),0,(-1)),COLORMAGENTA;
IFC(X_95,DRAWLINE(X_57,HIGH,X_53,LOW,0),DRAWNULL),COLORMAGENTA,LINETHICK3;
X_109:=BARSLAST(X_59);
X_110:=BARSLAST(X_53);
X_111:=BARSLAST(X_57);
X_112:=BARSLAST(X_55);
前高价:IF(微调开关=1,REF(REF(HIGH,X_109),1),DRAWNULL),NODRAW,COLORLIRED;
X_113:=IF(微调开关=1,REF(REF(LOW,X_110),1),DRAWNULL);
X_114:=IF(微调开关=1,REF(REF(HIGH,X_111),1),DRAWNULL);
前低价:IF(微调开关=1,REF(REF(LOW,X_112),1),DRAWNULL),NODRAW,COLORCYAN;
X_115:=前高价;
X_116:=X_113;
X_117:=X_114;
X_118:=IF(X_109>X_110,X_115,DRAWNULL);
X_119:=IF(X_110>X_111,X_116,DRAWNULL);
X_120:=IF(前高价>=X_114,X_115,DRAWNULL);
X_121:=IF(X_114>X_113,X_117,DRAWNULL);
X_122:=IF(LOW<=X_116,X_116,DRAWNULL);
X_123:=X_118 AND X_119 AND X_120 AND X_121 AND X_122;
X_124:=X_123;
X_125:=IFC(X_123,X_115,DRAWNULL);
X_126:=IFC(X_123,X_116,DRAWNULL);
X_127:=IFC(X_123,X_117,DRAWNULL);
X_128:=SQRT(X_125/X_126);
X_129:=SQRT(X_128);
X_130:=X_126/X_129;
X_131:=X_126/X_128;
X_132:=X_126/(X_128+X_129-1);
X_133:=CONST(X_130);
X_134:=CONST(X_131);
X_135:=CONST(X_132);
买入D1:DRAWLINE(X_57,CONST(X_130),CURRBARSCOUNT=1,X_130,1),DOTLINE,COLORGREEN;
买入D2:DRAWLINE(X_57,CONST(X_131),CURRBARSCOUNT=1,X_131,1),DOTLINE,COLORGREEN;
买入D3:DRAWLINE(X_57,CONST(X_132),CURRBARSCOUNT=1,X_132,1),DOTLINE,COLORGREEN;
DRAWTEXT(X_57,X_133,VARCAT(13,VAR2STR(X_133,2))),COLORWHITE;
DRAWTEXT(X_57,X_134,VARCAT(14,VAR2STR(X_134,2))),COLORWHITE;
DRAWTEXT(X_57,X_135,VARCAT(15,VAR2STR(X_135,2))),COLORWHITE;
DRAWTEXT(X_59,HIGH,VARCAT(16,VAR2STR(HIGH,2))),COLORLIRED;
STICKLINE(X_57,HIGH,CONST(X_132),0,(-1)),COLORGREEN;
IFC(X_123,DRAWLINE(X_59,HIGH,X_53,LOW,0),DRAWNULL),COLORGREEN,LINETHICK3;
IFC(X_123,DRAWLINE(X_53,LOW,X_57,HIGH,0),DRAWNULL),COLORFF8800,LINETHICK3;
DRAWLINE(X_57,HIGH,CURRBARSCOUNT=1,CONST(X_135),1),DOTLINE,COLORGREEN;
X_136:=BARSLAST(X_55);
X_137:=BARSLAST(X_57);
X_138:=BARSLAST(X_53);
X_139:=IF(微调开关=1,REF(REF(LOW,X_136),1),DRAWNULL);
X_140:=IF(微调开关=1,REF(REF(HIGH,X_137),1),DRAWNULL);
X_141:=IF(微调开关=1,REF(REF(LOW,X_138),1),DRAWNULL);
X_142:=X_139;
X_143:=X_140;
X_144:=X_141;
X_145:=IF(X_136>X_137,X_142,DRAWNULL);
X_146:=IF(X_137>X_138,X_143,DRAWNULL);
X_147:=IF(X_139<=X_141,X_142,DRAWNULL);
X_148:=IF(X_140>X_139,X_142,DRAWNULL);
X_149:=IF(HIGH>=X_143,X_143,DRAWNULL);
X_150:=X_145 AND X_146 AND X_147 AND X_148 AND X_149;
X_151:=X_150;
X_152:=IFC(X_150,X_142,DRAWNULL);
X_153:=IFC(X_150,X_143,DRAWNULL);
X_154:=IFC(X_150,X_144,DRAWNULL);
X_155:=SQRT(X_153/X_152);
X_156:=SQRT(X_155);
X_157:=X_153/X_156;
X_158:=X_153/X_155;
X_159:=X_153/(X_156+X_155-1);
X_160:=2*X_153-X_152-(X_158-X_159);
X_161:=X_153+(X_153-X_152);
X_162:=2*X_153-X_152+(X_157-X_158);
X_163:=CONST(X_160);
X_164:=CONST(X_161);
X_165:=CONST(X_162);
卖出D1:DRAWLINE(X_53,CONST(X_160),CURRBARSCOUNT=1,X_160,1),DOTLINE,COLORLIRED;
卖出D2:DRAWLINE(X_53,CONST(X_161),CURRBARSCOUNT=1,X_161,1),DOTLINE,COLORLIRED;
卖出D3:DRAWLINE(X_53,CONST(X_162),CURRBARSCOUNT=1,X_162,1),DOTLINE,COLORLIRED;
DRAWTEXT(X_53,卖出D1,VARCAT(17,VAR2STR(X_163,2))),COLORWHITE;
DRAWTEXT(X_53,卖出D2,VARCAT(18,VAR2STR(X_164,2))),COLORWHITE;
DRAWTEXT(X_53,卖出D3,VARCAT(19,VAR2STR(X_165,2))),COLORWHITE;
DRAWTEXT(X_55,LOW,VARCAT(20,VAR2STR(LOW,2))),COLORCYAN;
STICKLINE(X_53,LOW,CONST(X_162),0,(-1)),COLORLIRED;
IFC(X_150,DRAWLINE(X_55,LOW,X_57,HIGH,0),DRAWNULL),COLORLIRED,LINETHICK3;
IFC(X_150,DRAWLINE(X_57,HIGH,X_53,LOW,0),DRAWNULL),COLORMAGENTA,LINETHICK3;
DRAWLINE(X_53,LOW,CURRBARSCOUNT=1,CONST(X_165),1),DOTLINE,COLORLIRED;
DRAWICON(X_59,HIGH,39);
DRAWICON(X_55,LOW,38);
DRAWICON(X_53,LOW,38);
DRAWICON(X_57,HIGH,39);
预测趋势:IF(趋势线开关=1,DRAWLINE(X_64,IF(X_27,HIGH,LOW),ISLASTBAR,IF(X_61>X_62,HIGH,LOW),0),DRAWNULL),DOTLINE,COLORWHITE;
X_166:=IF(手动开关=1,CONST(REF(HIGH,高位A-1)),DRAWNULL);
X_167:=IF(手动开关=1,CONST(REF(LOW,低位B-1)),DRAWNULL);
X_168:=IF(手动开关=1,CONST(REF(HIGH,次高3买-1)),DRAWNULL);
X_169:=IF(次高3买=0,X_168,X_168);
X_170:=IF(高位A>低位B,X_166,DRAWNULL);
X_171:=IF(高位A>低位B,X_167,DRAWNULL);
X_172:=IF(X_166>X_167 AND 次高3买=0,X_166,DRAWNULL);
X_173:=IF(X_166>X_167 AND 次高3买=0,X_167,DRAWNULL);
X_174:=X_170 AND X_171 AND X_172 AND X_173;
X_175:=IF(X_168>X_167 AND X_166>X_168,X_168,DRAWNULL);
X_176:=IFC(X_174,X_166,DRAWNULL);
X_177:=IFC(X_174,X_167,DRAWNULL);
X_178:=SQRT(X_176/X_177);
X_179:=SQRT(X_178);
X_180:=X_177*SQRT(X_178);
X_181:=X_177*X_178;
X_182:=X_177*(X_178+X_179-1);
DRAWLINE(CURRBARSCOUNT=低位B,CONST(X_180),CURRBARSCOUNT=低位B-6,X_180,0),DOTLINE,COLORLIRED;
DRAWLINE(CURRBARSCOUNT=低位B,CONST(X_181),CURRBARSCOUNT=低位B-7,X_181,0),DOTLINE,COLORLIRED;
DRAWLINE(CURRBARSCOUNT=低位B,CONST(X_182),CURRBARSCOUNT=低位B-8,X_182,0),DOTLINE,COLORLIRED;
DRAWTEXT(CURRBARSCOUNT=低位B,X_180,VARCAT(21,VAR2STR(X_180,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=低位B,X_181,VARCAT(22,VAR2STR(X_181,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=低位B,X_182,VARCAT(23,VAR2STR(X_182,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=高位A,HIGH,VARCAT(24,VAR2STR(HIGH,2))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=低位B,LOW,VARCAT(25,VAR2STR(LOW,2))),COLORGREEN;
DRAWLINE(CURRBARSCOUNT=低位B,LOW,CURRBARSCOUNT=低位B-7,CONST(X_182),0),DOTLINE,COLORLIRED;
IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=高位A,HIGH,CURRBARSCOUNT=低位B,LOW,0),DRAWNULL),COLORFF0080,LINETHICK3;
STICKLINE(CURRBARSCOUNT=低位B,LOW,CONST(X_182),0,(-1)),COLORLIRED;
X_183:=IFC(X_166>X_167 AND X_175 AND 次高3买>0 AND 高位A>低位B,X_166,DRAWNULL);
X_184:=IFC(X_166>X_167 AND X_175 AND 次高3买>0 AND 高位A>低位B,X_167,DRAWNULL);
X_185:=SQRT(X_183/X_184);
X_186:=SQRT(X_185);
X_187:=X_184/X_186;
X_188:=X_184/X_185;
X_189:=X_184/(X_185+X_186-1);
DRAWLINE(CURRBARSCOUNT=次高3买,CONST(X_187),CURRBARSCOUNT=次高3买-6,X_187,0),DOTLINE,COLORGREEN;
DRAWLINE(CURRBARSCOUNT=次高3买,CONST(X_188),CURRBARSCOUNT=次高3买-7,X_188,0),DOTLINE,COLORGREEN;
DRAWLINE(CURRBARSCOUNT=次高3买,CONST(X_189),CURRBARSCOUNT=次高3买-8,X_189,0),DOTLINE,COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=次高3买,X_187,VARCAT(26,VAR2STR(X_187,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=次高3买,X_188,VARCAT(27,VAR2STR(X_188,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=次高3买,X_189,VARCAT(28,VAR2STR(X_189,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=次高3买,HIGH,VARCAT(29,VAR2STR(HIGH,2))),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=次高3买,HIGH,CURRBARSCOUNT=次高3买-7,CONST(X_189),0),DOTLINE,COLORGREEN;
STICKLINE(CURRBARSCOUNT=次高3买,HIGH,CONST(X_189),0,(-1)),COLORGREEN;
IF(手动开关=1 AND X_175 AND 低位B<高位A,DRAWLINE(CURRBARSCOUNT=低位B,LOW,CURRBARSCOUNT=次高3买,HIGH,0),DRAWNULL),COLORFF0080,LINETHICK3;
DRAWICON(CURRBARSCOUNT=高位A,HIGH,39);
DRAWICON(CURRBARSCOUNT=低位B,LOW,38);
X_190:=IF(手动开关=1,CONST(REF(HIGH,高位A-1)),DRAWNULL);
X_191:=IF(手动开关=1,CONST(REF(LOW,低位B-1)),DRAWNULL);
X_192:=IF(手动开关=1,CONST(REF(LOW,后低3卖-1)),DRAWNULL);
X_193:=IF(X_192>X_191 AND X_190>X_192,X_192,DRAWNULL);
X_194:=IF(高位A<低位B,X_190,DRAWNULL);
X_195:=IF(高位A<低位B,X_191,DRAWNULL);
X_196:=IF(X_190>X_191 AND 后低3卖=0,X_190,DRAWNULL);
X_197:=IF(X_190>X_191 AND 后低3卖=0,X_191,DRAWNULL);
X_198:=X_194 AND X_195 AND X_196 AND X_197;
X_199:=IFC(X_198,X_190,DRAWNULL);
X_200:=IFC(X_198,X_191,DRAWNULL);
X_201:=SQRT(X_199/X_200);
X_202:=SQRT(X_201);
X_203:=X_199/SQRT(X_201);
X_204:=X_199/X_201;
X_205:=X_199/(X_201+X_202-1);
DRAWLINE(CURRBARSCOUNT=高位A,CONST(X_203),CURRBARSCOUNT=高位A-6,X_203,0),DOTLINE,COLORGREEN;
DRAWLINE(CURRBARSCOUNT=高位A,CONST(X_204),CURRBARSCOUNT=高位A-7,X_204,0),DOTLINE,COLORGREEN;
DRAWLINE(CURRBARSCOUNT=高位A,CONST(X_205),CURRBARSCOUNT=高位A-8,X_205,0),DOTLINE,COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=高位A,X_203,VARCAT(30,VAR2STR(X_203,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=高位A,X_204,VARCAT(31,VAR2STR(X_204,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=高位A,X_205,VARCAT(32,VAR2STR(X_205,2))),COLORWHITE;
DRAWLINE(CURRBARSCOUNT=高位A,HIGH,CURRBARSCOUNT=高位A-7,CONST(X_205),0),DOTLINE,COLORGREEN;
IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=低位B,LOW,CURRBARSCOUNT=高位A,HIGH,0),DRAWNULL),COLORLIRED,LINETHICK3;
STICKLINE(CURRBARSCOUNT=高位A,HIGH,CONST(X_205),0,(-1)),COLORGREEN;
X_206:=IFC(X_192>X_191 AND X_193 AND 后低3卖>0 AND 低位B>高位A,X_190,DRAWNULL);
X_207:=IFC(X_192>X_191 AND X_193 AND 后低3卖>0 AND 低位B>高位A,X_191,DRAWNULL);
X_208:=SQRT(X_206/X_207);
X_209:=SQRT(X_208);
X_210:=X_206/X_209;
X_211:=X_206/X_208;
X_212:=X_206/(X_208+X_209-1);
X_213:=X_206/(X_208+X_209-0.98);
X_214:=2*X_206-X_207-(X_211-X_212);
X_215:=X_206+(X_206-X_207);
X_216:=2*X_206-X_207+(X_210-X_211);
DRAWLINE(CURRBARSCOUNT=后低3卖,CONST(X_214),CURRBARSCOUNT=后低3卖-6,X_214,0),DOTLINE,COLORLIRED;
DRAWLINE(CURRBARSCOUNT=后低3卖,CONST(X_215),CURRBARSCOUNT=后低3卖-7,X_215,0),DOTLINE,COLORLIRED;
DRAWLINE(CURRBARSCOUNT=后低3卖,CONST(X_216),CURRBARSCOUNT=后低3卖-8,X_216,0),DOTLINE,COLORLIRED;
DRAWTEXT(CURRBARSCOUNT=后低3卖,LOW,VARCAT(33,VAR2STR(LOW,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,X_214,VARCAT(34,VAR2STR(X_214,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,X_215,VARCAT(35,VAR2STR(X_215,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,X_216,VARCAT(36,VAR2STR(X_216,2))),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=后低3卖,LOW,CURRBARSCOUNT=后低3卖-7,CONST(X_216),0),DOTLINE,COLORLIRED;
IF(手动开关=1 AND X_193 AND 高位A<低位B,DRAWLINE(CURRBARSCOUNT=高位A,HIGH,CURRBARSCOUNT=后低3卖,LOW,0),DRAWNULL),COLORLIRED,LINETHICK3;
STICKLINE(CURRBARSCOUNT=后低3卖,LOW,CONST(X_216),0,(-1)),COLORLIRED;
枭雄七指副图
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
DRAWICON(DIFF>DEA,1,1);
DRAWICON(DIFF<DEA,1,2);
DRAWTEXT(ISLASTBAR=1,1,'MACD.MACD'),COLORFFFFFF;
A1:=DIFF>DEA;
MACD金叉:IF(A1,1,0),COLORRED;
RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
DRAWICON(K>D,2,1);
DRAWICON(K<D,2,2);
DRAWTEXT(ISLASTBAR=1,2,'.KDJ'),COLORFFFFFF;
A2:=K>D;
KDJ金叉:IF(A2,2,0),COLORRED;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
DRAWICON(RSI1>RSI2,3,1);
DRAWICON(RSI1<RSI2,3,2);
DRAWTEXT(ISLASTBAR=1,3,'.RSI'),COLORFFFFFF;
A3:=RSI1>RSI2;
RSI金叉:IF(A3,3,0),COLORRED;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
DRAWICON(LWR1>LWR2,4,1);
DRAWICON(LWR1<LWR2,4,2);
DRAWTEXT(ISLASTBAR=1,4,'.LWR'),COLORFFFFFF;
A4:=LWR1>LWR2;
LWR金叉:IF(A4,4,0),COLORRED;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
DRAWICON(CLOSE>BBI,5,1);
DRAWICON(CLOSE<BBI,5,2);
DRAWTEXT(ISLASTBAR=1,5,'.BBI'),COLORFFFFFF;
A5:=CLOSE>BBI;
BBI金叉:IF(A5,5,0),COLORRED;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
DRAWICON(MMS>MMM,6,1);
DRAWICON(MMS<MMM,6,2);
DRAWTEXT(ISLASTBAR=1,6,'.MTM'),COLORFFFFFF;
A6:=MMS>MMM;
MTM金叉:IF(A6,6,0),COLORRED;
涨买入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0),COLORYELLOW,LINETHICK2;
上涨:IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,7,0),COLORYELLOW,LINETHICK2;
晴天:BARSLASTCOUNT(A1 AND A2 AND A3 AND A4 AND A5 AND A6),LINETHICK0;
雨天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉>0 AND MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉<21 ),LINETHICK0;
雪天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉=0),LINETHICK0;
枭雄密探引跌副图
STICKLINE(C>0,55,-15,15,0),COLOR8C7853;
日跌:=L*0.99,COLORGREEN,NODRAW;
峰:=PEAKBARS(1,3,1)=0;
峰距:=BARSLAST(峰),NODRAW;
GG:=峰距>0,NODRAW;
引跌一:REF(L,峰距=1)*0.99*GG ,COLORWHITE,NODRAW;
跌1:=L<引跌一 AND 峰距>0 ,NODRAW;
A2:=跌1*峰距,NODRAW;
A3:=COUNT(跌1,峰距),NODRAW;
一跌:=IF(A3>1,A3=1,A2),COLORWHITE,NODRAW;
STICKLINE(一跌,55,45,2,0)COLORRED;
跌距1:=BARSLAST(一跌),NODRAW;
B1:=REF(L,跌距1=1)*0.99 ,COLORWHITE,NODRAW;
引跌二:IF(一跌 OR 跌距1>峰距,0,B1),COLORWHITE,NODRAW;
跌2:=L<引跌二 AND 跌距1>0,NODRAW;
B2:=跌2*峰距,NODRAW;
B3:=COUNT(跌2,峰距),NODRAW;
二跌:=IF(B3>1,B3=1,B2),COLORWHITE,NODRAW;
STICKLINE(二跌,55,45,2,0)COLORRED;
STICKLINE(二跌,35,45,2,0)COLORGREEN;
跌距2:=BARSLAST(二跌),NODRAW;
价3:=REF(L,跌距2=1)*0.99 ,COLORWHITE,NODRAW;
引跌三:IF(一跌 OR 二跌 OR 峰距<跌距2 , 0,价3),COLORWHITE,NODRAW;
跌3:=(L-0.005)<引跌三 AND 跌距1<峰距 AND 跌距2<跌距1 ,NODRAW;
C2:=跌3*峰距,NODRAW;
C3:=COUNT(跌3,峰距),NODRAW;
三跌:=IF(C3>1,C3=1,C2),COLORWHITE,NODRAW;
STICKLINE(三跌,45,55,2,0)COLORRED;
STICKLINE(三跌,35,45,2,0)COLORGREEN;
STICKLINE(三跌,25,35,2,0)COLORYELLOW;
跌距3:=BARSLAST(三跌),NODRAW;
价4:=REF(L,跌距3=1)*0.99 ,COLORWHITE,NODRAW;
引跌四:IF(一跌 OR 二跌 OR 三跌 OR 峰距<跌距3 , 0,价4),COLORWHITE,NODRAW;
跌4:=(L-0.005)<引跌四 AND 跌距1<峰距 AND 跌距3<跌距1 ,NODRAW;
D2:=跌4*峰距,NODRAW;
D3:=COUNT(跌4,峰距),NODRAW;
四跌:=IF(D3>1,D3=1,D2),COLORWHITE,NODRAW;
STICKLINE(四跌,45,55,2,0)COLORRED;
STICKLINE(四跌,35,45,2,0)COLORGREEN;
STICKLINE(四跌,25,35,2,0)COLORYELLOW;
STICKLINE(四跌,25,15,2,0)COLORMAGENTA;
跌距4:=BARSLAST(四跌),NODRAW;
价5:=REF(L,跌距4=1)*0.99 ,COLORWHITE,NODRAW;
引跌五:IF(一跌 OR 二跌 OR 三跌 OR 四跌 OR 峰距<跌距4 , 0,价5),COLORWHITE,NODRAW;
跌5:=(L-0.005)<引跌五 AND 跌距1<峰距 AND 跌距4<跌距1 ,NODRAW;
E2:=跌5*峰距,NODRAW;
E3:=COUNT(跌5,峰距),NODRAW;
五跌:=IF(E3>1,E3=1,E2),COLORWHITE,NODRAW;
STICKLINE(五跌,45,55,2,0)COLORRED;
STICKLINE(五跌,35,45,2,0)COLORGREEN;
STICKLINE(五跌,25,35,2,0)COLORYELLOW;
STICKLINE(五跌,25,15,2,0)COLORMAGENTA;
STICKLINE(五跌,5,15,2,0)COLORWHITE;
枭雄密探抄底副图
V1:=MA(C,3)=HHV(MA(C,3),7);
V2:=MA(C,3)>MA(C,5);
V3:=MA(V,5)>MA(V,10)*1.01;
V4:=COUNT(MA(C,1)>REF(C,1),2)=2;
LC20:=REF(CLOSE,1);
RSI20:=SMA(MAX(CLOSE-LC20,0),4.1,1)/SMA(ABS(CLOSE-LC20),4.1,1)*100;
STICKLINE(CROSS(RSI20,11)*1,-10,20,2,0),COLORYELLOW;
VAR3A:=3;
VAR2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
加仓:IF(FILTER(YXF=1,5),20,-10),STICK,COLORBLUE,LINETHICK3;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
FY:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
QS:(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2)),LINETHICK2,COLORRED;
枭雄密探低买 副图选股一体
N:=5;
VAR2:=CLOSE*VOL;
VAR3:=EMA((EXPMA(VAR2,3)/EXPMA(VOL,3)+EXPMA(VAR2,6)/EXPMA(VOL,6)+EXPMA(VAR2,12)/EXPMA(VOL,12)+EXPMA(VAR2,24)/EXPMA(VOL,24))/4,13);
SUP:=1.06*VAR3;
SDN:=VAR3*0.94;
涨幅:=(C-REF(C,1))/REF(C,1)*100;
五日总涨幅:=SUM((C-REF(C,1))/REF(C,1)*100,N)<5;
枭雄低买:REF(涨幅<-5.5,N) AND 五日总涨幅 AND C>SDN;