请老师修改一下 [博易POBO]
咨询内容:
HJ_2:=7;
HJ_3:=10;
//DRAWGBK(CLOSE>0,RGB(1,1,1),RGB(1,1,1),0,0,1);
AMOUNT:=AVPRICE*V;
CAPITAL:=GETPRICE1('流通股本');
INDEXL:="999001$L";
INDEXC:="999001$C";
INDEXH:="999001$H";
CURRBARSCOUNT:=DATACOUNT-BARPOS+1,NODRAW;
平均成本:COST(50),COLORRED;
HJ_4:=0;
HJ_5:=0;
HJ_6:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJ_7:=IF(CLOSE<500 ,0,(20*HJ_6+19*REF(HJ_6,1)+18*REF(HJ_6,2)+17*REF(HJ_6,3)+16*REF(HJ_6,4)+15*REF(HJ_6,5)+14*REF(HJ_6,6)+13*REF(HJ_6,7)+12*REF(HJ_6,8)+11*REF(HJ_6,9)+10*REF(HJ_6,10)+9*REF(HJ_6,11)+8*REF(HJ_6,12)+7*REF(HJ_6,13)+6*REF(HJ_6,14)+5*REF(HJ_6,15)+4*REF(HJ_6,16)+3*REF(HJ_6,17)+2*REF(HJ_6,18)+REF(HJ_6,20))/210);
HJ_8:=IF(CLOSE<500 ,0,MA(HJ_7,5));
主力成本:IF(CLOSE<500 ,0,(HJ_7+HJ_8)/2),COLOR0000CC;
//DRAWBAND(HJ_7,RGB(99,0,0),HJ_8,RGB(0,99,0));
FILLRGN(HJ_7>HJ_8,HJ_7,HJ_8,RGB(99,0,0));
FILLRGN(HJ_7<HJ_8,HJ_7,HJ_8,RGB(0,99,0));
生命线:COST(80)*0.9998,COLORWHITE;
HJ_9:=LOW>REF(HIGH,1)+0.001;
HJ_10:=BARSLAST(HJ_9);
HJ_11:=COUNT(LOW>REF(HIGH,HJ_10+1),HJ_10+1)=HJ_10+1;
HJ_12:=CROSS(BACKSET(HJ_11>0 AND ISLASTBAR,HJ_10+1),0.5);
HJ_13:=BARSLAST(HJ_12);
HJ_14:=IF(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),REFX1(LLV(LOW,HJ_13+1),10000),NULL);
HJ_15:=IF(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),REF(HIGH,HJ_13+1),NULL);
STICKLINE(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),HJ_14,HJ_15,15,0),COLORGRAY;
HJ_16:=HIGH<REF(LOW,1)-0.001;
HJ_17:=BARSLAST(HJ_16);
HJ_18:=COUNT(HIGH<REF(LOW,HJ_17+1),HJ_17+1)=HJ_17+1;
HJ_19:=CROSS(BACKSET(HJ_18>0 AND ISLASTBAR,HJ_17+1),0.5);
HJ_20:=BARSLAST(HJ_19);
HJ_21:=IF(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),REFX1(HHV(HIGH,HJ_20+1),10000),NULL);
HJ_22:=IF(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),REF(LOW,HJ_20+1),NULL);
STICKLINE(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),HJ_21,HJ_22,15,0),COLORGRAY;
HJ_23:=COST(1);
HJ_24:=COST(10);
HJ_25:=COST(20);
HJ_26:=COST(30);
HJ_27:=COST(40);
HJ_28:=COST(50);
HJ_29:=COST(60);
HJ_30:=COST(70);
HJ_31:=COST(80);
HJ_32:=COST(90);
HJ_33:=COST(99);
HJ_34:=COST(5);
HJ_35:=COST(15);
HJ_36:=COST(25);
HJ_37:=COST(35);
HJ_38:=COST(45);
HJ_39:=COST(55);
HJ_40:=COST(65);
HJ_41:=COST(75);
HJ_42:=COST(85);
HJ_43:=COST(95);
HJ_44:=HJ_34-HJ_23;
HJ_45:=HJ_24-HJ_34;
HJ_46:=HJ_35-HJ_24;
HJ_47:=HJ_25-HJ_35;
HJ_48:=HJ_36-HJ_25;
HJ_49:=HJ_26-HJ_36;
HJ_50:=HJ_37-HJ_26;
HJ_51:=HJ_27-HJ_37;
HJ_52:=HJ_38-HJ_27;
HJ_53:=HJ_28-HJ_38;
HJ_54:=HJ_39-HJ_28;
HJ_55:=HJ_29-HJ_39;
HJ_56:=HJ_40-HJ_29;
HJ_57:=HJ_30-HJ_40;
HJ_58:=HJ_41-HJ_30;
HJ_59:=HJ_31-HJ_41;
HJ_60:=HJ_42-HJ_31;
HJ_61:=HJ_32-HJ_42;
HJ_62:=HJ_43-HJ_32;
HJ_63:=HJ_33-HJ_43;
HJ_64:=MIN(HJ_44,MIN(HJ_45,MIN(HJ_46,MIN(HJ_47,MIN(HJ_48,MIN(HJ_49,MIN(HJ_50,MIN(HJ_51,MIN(HJ_52,MIN(HJ_53,MIN(HJ_54,MIN(HJ_55,MIN(HJ_56,MIN(HJ_57,MIN(HJ_58,MIN(HJ_59,MIN(HJ_60,MIN(HJ_61,MIN(HJ_62,HJ_63)))))))))))))))))));
HJ_65:=IF(HJ_5=1,0,HJ_64);
STICKLINE(HJ_65=HJ_44,HJ_23,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_45,HJ_24,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_46,HJ_35,HJ_24,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_47,HJ_25,HJ_35,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_48,HJ_36,HJ_25,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_49,HJ_26,HJ_36,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_50,HJ_37,HJ_26,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_51,HJ_27,HJ_37,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_52,HJ_38,HJ_27,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_53,HJ_28,HJ_38,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_54,HJ_39,HJ_28,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_55,HJ_29,HJ_39,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_56,HJ_40,HJ_29,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_57,HJ_30,HJ_40,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_58,HJ_41,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_59,HJ_31,HJ_41,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_60,HJ_42,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_61,HJ_32,HJ_42,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_62,HJ_43,HJ_32,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_63,HJ_33,HJ_43,5,0),COLORFF8800;
HJ_66:=IF(HJ_4=1,0,HJ_33-HJ_23);
HJ_67:=HJ_32-HJ_29;
HJ_68:=HJ_31-HJ_28;
HJ_69:=HJ_30-HJ_27;
HJ_70:=HJ_29-HJ_26;
HJ_71:=HJ_28-HJ_25;
HJ_72:=HJ_27-HJ_24;
HJ_73:=HJ_26-HJ_23;
STICKLINE(HJ_67/HJ_66<0.08,HJ_32,HJ_29,5,0),COLOR004455;
STICKLINE(HJ_68/HJ_66<0.08,HJ_31,HJ_28,5,0),COLOR004455;
STICKLINE(HJ_69/HJ_66<0.08,HJ_30,HJ_27,5,0),COLOR004455;
STICKLINE(HJ_70/HJ_66<0.08,HJ_29,HJ_26,5,0),COLOR004455;
STICKLINE(HJ_71/HJ_66<0.08,HJ_28,HJ_25,5,0),COLOR004455;
STICKLINE(HJ_72/HJ_66<0.08,HJ_27,HJ_24,5,0),COLOR004455;
HJ_74:=HJ_32-HJ_30;
HJ_75:=HJ_31-HJ_29;
HJ_76:=HJ_30-HJ_28;
HJ_77:=HJ_29-HJ_27;
HJ_78:=HJ_28-HJ_26;
HJ_79:=HJ_27-HJ_25;
HJ_80:=HJ_26-HJ_24;
STICKLINE(HJ_74/HJ_66<0.05,HJ_32,HJ_30,5,0),COLOR554400;
STICKLINE(HJ_75/HJ_66<0.05,HJ_31,HJ_29,5,0),COLOR554400;
STICKLINE(HJ_76/HJ_66<0.05,HJ_30,HJ_28,5,0),COLOR554400;
STICKLINE(HJ_77/HJ_66<0.05,HJ_29,HJ_27,5,0),COLOR554400;
STICKLINE(HJ_78/HJ_66<0.05,HJ_28,HJ_26,5,0),COLOR554400;
STICKLINE(HJ_79/HJ_66<0.05,HJ_27,HJ_25,5,0),COLOR554400;
STICKLINE(HJ_80/HJ_66<0.05,HJ_26,HJ_24,5,0),COLOR554400;
HJ_81:=MA(CLOSE,20);
HJ_82:=BARSLASTCOUNT(CLOSE<HJ_81);
HJ_83:=BACKSET((HJ_82>=4)*HJ_82,HJ_82);
HJ_84:=BARSLASTCOUNT(CLOSE>HJ_81);
HJ_85:=BACKSET((HJ_84>=4)*HJ_84,HJ_84);
HJ_86:=BARSLASTCOUNT(NOT(HJ_83 OR HJ_85));
HJ_87:=BARSLASTCOUNT(REF(HJ_83>0,HJ_86));
HJ_88:=BARSLASTCOUNT(REF(HJ_85>0,HJ_86));
HJ_89:=IF(HJ_4=1,0,(LLV(LOW,HJ_87)=LOW));
HJ_90:=IF(HJ_5=1,0,(HHV(HIGH,HJ_88)=HIGH));
HJ_91:=IF(HJ_4=1,0,REF(HIGH,BARSLAST(HJ_90)));
HJ_92:=IF(HJ_5=1,0,REF(LOW,BARSLAST(HJ_89)));
HJ_93:=BARSLAST(HJ_87=1);
HJ_94:=REF(HJ_91,BARSLAST(HJ_87));
HJ_95:=REF(HJ_92,HJ_93);
HJ_96:=(HJ_94-HJ_95)*0.191+HJ_95;
HJ_97:=(HJ_94-HJ_95)*0.382+HJ_95;
HJ_98:=(HJ_94-HJ_95)*0.5+HJ_95;
HJ_99:=(HJ_94-HJ_95)*0.618+HJ_95;
HJ_100:=(HJ_94-HJ_95)*0.809+HJ_95;
HJ_101:=HJ_94+(HJ_94-HJ_95)*0.191;
HJ_102:=HJ_95-(HJ_94-HJ_95)*0.191;
HJ_103:=REFX1(HJ_95,10000);
HJ_104:=REFX1(HJ_97,10000);
HJ_105:=REFX1(HJ_99,10000);
HJ_106:=REFX1(HJ_94,10000);
HJ_107:=REFX1(HJ_101,10000);
HJ_108:=REFX1(HJ_102,10000);
//DRAWBAND(HJ_103,RGB(68,68,0),HJ_108,RGB(68,68,0));
FILLRGN(HJ_103>HJ_108,HJ_103,HJ_108,RGB(68,68,0));
FILLRGN(HJ_103<HJ_108,HJ_103,HJ_108,RGB(68,68,0));
//DRAWBAND(HJ_107,RGB(78,78,0),HJ_106,RGB(78,78,0));
FILLRGN(HJ_107>HJ_106,HJ_107,HJ_106,RGB(78,78,0));
FILLRGN(HJ_107<HJ_106,HJ_107,HJ_106,RGB(78,78,0));
HJ_109:=IF(PERIOD=7,7,IF(PERIOD=6,14,30));
HJ_110:=IF(PERIOD=7,8,IF(PERIOD=6,16,35));
HJ_111:=IF(PERIOD=7,9,IF(PERIOD=6,18,40));
HJ_112:=IF(PERIOD=7,10,IF(PERIOD=6,20,45));
HJ_113:=IF(PERIOD=7,11,IF(PERIOD=6,22,50));
HJ_114:=IF(PERIOD=7,12,IF(PERIOD=6,24,55));
HJ_115:=EMA(CLOSE,HJ_109);
HJ_116:=EMA(CLOSE,HJ_110);
HJ_117:=EMA(CLOSE,HJ_111);
HJ_118:=EMA(CLOSE,HJ_112);
HJ_119:=EMA(CLOSE,HJ_113);
HJ_120:=EMA(CLOSE,HJ_114);
HJ_121:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
NOTEXTM1:IF(CLOSE>0 AND HJ_121,HJ_115,NULL),COLOR005500;
NOTEXTM2:IF(CLOSE>0 AND HJ_121,HJ_116,NULL),COLOR007700;
NOTEXTM3:IF(CLOSE>0 AND HJ_121,HJ_117,NULL),COLOR009900;
NOTEXTM4:IF(CLOSE>0 AND HJ_121,HJ_118,NULL),COLOR00BB00;
NOTEXTM5:IF(CLOSE>0 AND HJ_121,HJ_119,NULL),COLOR00DD00;
NOTEXTM6:IF(CLOSE>0 AND HJ_121,HJ_120,NULL),COLORGREEN;
NOTEXTM11:IF(HJ_115>REF(HJ_115,1) AND HJ_121,HJ_115,NULL),COLOR550055;
NOTEXTM22:IF(HJ_116>REF(HJ_116,1) AND HJ_121,HJ_116,NULL),COLOR770077;
NOTEXTM33:IF(HJ_117>REF(HJ_117,1) AND HJ_121,HJ_117,NULL),COLOR990099;
NOTEXTM44:IF(HJ_118>REF(HJ_118,1) AND HJ_121,HJ_118,NULL),COLORBB00BB;
NOTEXTM55:IF(HJ_119>REF(HJ_119,1) AND HJ_121,HJ_119,NULL),COLORDD00DD;
NOTEXTM66:IF(HJ_120>REF(HJ_120,1) AND HJ_121,HJ_120,NULL),COLORMAGENTA;
HJ_122:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT大盘:IF(CLOSE<500 ,(INDEXC/HJ_122+0.812*REF(INDEXC/HJ_122,1)+0.618*REF(INDEXC/HJ_122,2)+0.382*REF(INDEXC/HJ_122,3)+0.191*REF(INDEXC/HJ_122,4))/3.003,NULL),COLOR008888;
HJ_123:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT行业:IF(CLOSE<500 ,(INDEXC/HJ_123+0.812*REF(INDEXC/HJ_123,1)+0.618*REF(INDEXC/HJ_123,2)+0.382*REF(INDEXC/HJ_123,3)+0.191*REF(INDEXC/HJ_123,4))/3.003,NULL),COLOR888888;
HJ_124:=(CLOSE+0.812*REF(CLOSE,1)+0.618*REF(CLOSE,2)+0.382*REF(CLOSE,3)+0.191*REF(CLOSE,4))/3.003;
STICKLINE(HJ_124>NOTEXT行业 AND HJ_124>NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLORBB00BB;
STICKLINE(HJ_124<NOTEXT行业 AND HJ_124<NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLOR00BB00;
HJ_125:=DAY<>REF(DAY,1);
HJ_126:=BARSLAST(HJ_125)+1;
HJ_127:=VOL*(CLOSE+LOW+HIGH)/3;
HJ_128:=SUM(HJ_127,HJ_126)/SUM(VOL,HJ_126);
HJ_129:=SUM(AMOUNT,HJ_126)/SUM(VOL,HJ_126)/100;
HJ_130:=IF(CLOSE<500,HJ_129,HJ_128);
HJ_131:=IF(HJ_125<=REFX1(HJ_126,10000),HJ_128,NULL);
HJ_132:=REF(HJ_131,1)*1.0001;
短线盈损:IF( CLOSE<500,0,HJ_132),COLORDDDDDD;
HJ_133:=REFX1(MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1),30),1000);
HJ_134:=MA(CLOSE,1);
HJ_135:=SMA(SMA(HJ_134,2,1),2,1);
HJ_136:=MA(HJ_135,3);
HJ_137:=IF(CROSS(HJ_89,0.5),1,IF(CROSS(HJ_90,0.5),(-1),0));
HJ_138:=IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135>HJ_136,1,IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135<=HJ_136,(-1),HJ_137));
HJ_139:=REF(HJ_138,BARSLAST(HJ_138));
HJ_140:=ZIGZAG(C,HJ_3,1);
HJ_141:=PEAK(C,HJ_3,1,1);
HJ_142:=TROUGH(C,HJ_3,1,1);
HJ_143:=HJ_140>REF(HJ_140,1);
HJ_144:=HJ_140<=REF(HJ_140,1);
HJ_145:=IF(HJ_4=1,0,REF(HJ_139=1,1));
HJ_146:=IF(HJ_5=1,0,REF(HJ_139=(-1),1));
HJ_147:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
HJ_148:=IF(HJ_147,HJ_145,IF(PERIOD>=5,HJ_143,HJ_145));
HJ_149:=IF(HJ_147,HJ_146,IF(PERIOD>=5,HJ_144,HJ_146));
HJ_150:=IF(CROSS(HJ_148=1,0.5)||CROSS(HJ_149=1,0.5),1,0);
HJ_151:=HJ_150=1;
HJ_152:=IF(HJ_151,LLV(LOW,2),0);
HJ_153:=IF(HJ_152=0,REF(HJ_152,BARSLAST(HJ_151)),HJ_152);
IF(HJ_153=REF(HJ_153,1),HJ_153,NULL),COLOR00CCCC;
HJ_154:=HJ_150=2;
HJ_155:=IF(HJ_154,HHV(HIGH,2),0);
HJ_156:=IF(HJ_155=0,REF(HJ_155,BARSLAST(HJ_154)),HJ_155);
IF(HJ_156=REF(HJ_156,1),HJ_156,NULL),COLORCCCC00;
HJ_157:=BARSLAST(HJ_150=1);
止损位:MIN(REF(CLOSE,HJ_157),REF(CLOSE,HJ_157+1)),NODRAW,COLOR00CCCC;
HJ_158:=BARSLAST(HJ_150=2);
止盈位:MAX(REF(CLOSE,HJ_158),REF(CLOSE,HJ_158+1)),NODRAW,COLORCCCC00;
IF(止盈位=REF(止盈位,1),止盈位,NULL),DOT,COLORCCCC00;
IF(止损位=REF(止损位,1),止损位,NULL),DOT,COLOR00CCCC;
STICKLINE1(HJ_148,HIGH,LOW,1,0),COLORGREEN;
STICKLINE1(HJ_148 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORGREEN;
STICKLINE1(HJ_148 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORGREEN;
STICKLINE1(HJ_149,HIGH,LOW,0,0),COLORRED;
STICKLINE1(HJ_149 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORRED;
STICKLINE1(HJ_149 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORRED;
HJ_159:=IF((CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=10-0.01*100/REF(OPEN,1),1,0);
STICKLINE(HJ_159,OPEN,CLOSE,0,0),COLORYELLOW;
HJ_160:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(HJ_160<(-9.9),OPEN,CLOSE,0.3,0),COLORBLUE;
HJ_161:=REF(HIGH,HJ_1)=HHV(HIGH,2*HJ_1+1);
HJ_162:=BACKSET(HJ_161,HJ_1+1);
HJ_163:=FILTER(HJ_162,HJ_1) AND HIGH=HHV(HIGH,HJ_1+1);
HJ_164:=IF(HJ_4=1,0,BARSLAST(HJ_163));
HJ_165:=IF(HJ_163,CURRBARSCOUNT,0);
HJ_166:=IF(HJ_164,REF(HIGH,HJ_164),HIGH);
HJ_167:=IF(HJ_164,REF(HJ_165,HJ_164),HJ_165);
HJ_168:=REF(HJ_166,HJ_164+1);
HJ_169:=REFX1(HJ_167,10000);
HJ_170:=REF(HJ_167,HJ_164+1);
HJ_171:=REFX1(HJ_170,10000);
HJ_172:=REF(HJ_168,HJ_164+1);
HJ_173:=IF(CURRBARSCOUNT>HJ_171,0,1);
DRAWLINE1(CURRBARSCOUNT=HJ_171,HIGH,CURRBARSCOUNT=HJ_169,HIGH,1);
HJ_174:=TRENDLINES(CURRBARSCOUNT=HJ_171,HIGH,CURRBARSCOUNT=HJ_169,HIGH);
压力线:IF(HJ_174>REF(HJ_174,1),NULL,HJ_174),COLOR999900,LINETHICK3;
HJ_175:=REF(LOW,HJ_2)=LLV(LOW,2*HJ_2+1);
HJ_176:=BACKSET(HJ_175,HJ_2+1);
HJ_177:=FILTER(HJ_176,HJ_2) AND LOW=LLV(LOW,HJ_2+1);
HJ_178:=IF(HJ_5=1,0,BARSLAST(HJ_177));
HJ_179:=IF(HJ_177,CURRBARSCOUNT,0);
HJ_180:=IF(HJ_178,REF(LOW,HJ_178),LOW);
HJ_181:=IF(HJ_178,REF(HJ_179,HJ_178),HJ_179);
HJ_182:=REFX1(HJ_181,10000);
HJ_183:=REF(HJ_180,HJ_178+1);
HJ_184:=REF(HJ_181,HJ_178+1);
HJ_185:=REFX1(HJ_184,10000);
DRAWLINE1(CURRBARSCOUNT=HJ_185,LOW,CURRBARSCOUNT=HJ_182,LOW,1);
HJ_186:=TRENDLINES(CURRBARSCOUNT=HJ_185,LOW,CURRBARSCOUNT=HJ_182,LOW);
支撑线:IF(HJ_186<REF(HJ_186,1),NULL,HJ_186),COLOR990099,LINETHICK3;
HJ_187:=BACKSET(BARSTATUS=2,BARSLAST(HJ_163)+1);
HJ_188:=HJ_187>REF(HJ_187,1);
HJ_189:=BACKSET(BARSTATUS=2,BARSLAST(HJ_177)+1);
HJ_190:=HJ_189>REF(HJ_189,1);
HJ_191:=BACKSET(HJ_188,REF(BARSLAST(HJ_163),1)+2);
HJ_192:=HJ_191>REF(HJ_191,1);
HJ_193:=BACKSET(HJ_190,REF(BARSLAST(HJ_177),1)+2);
HJ_194:=HJ_193>REF(HJ_193,1);
HJ_195:=BARSLAST(HJ_190)+1;
HJ_196:=BARSLAST(HJ_194)+1;
HJ_197:=IF(HJ_195=NULL AND HJ_196>0 AND HJ_163 AND HJ_4<>1,HIGH,NULL);
HJ_198:=BARSLAST(HJ_188)+1;
HJ_199:=BARSLAST(HJ_192)+1;
HJ_200:=IF(HJ_198=NULL AND HJ_199>0 AND HJ_177 AND HJ_5<>1,LOW,NULL);
HJ_201:=REFX1(HHV(HJ_197-支撑线,0),10000);
HJ_202:=REFX1(HHV(压力线-HJ_200,0),10000);
DRAWLINE1(CURRBARSCOUNT=HJ_185,LOW+HJ_201,CURRBARSCOUNT=HJ_182,LOW+HJ_201,1),COLOR990099,LINETHICK2;
支撑通道:=TRENDLINES(CURRBARSCOUNT=HJ_185,LOW+HJ_201,CURRBARSCOUNT=HJ_182,LOW+HJ_201);
DRAWLINE1(CURRBARSCOUNT=HJ_171,HIGH-HJ_202,CURRBARSCOUNT=HJ_169,HIGH-HJ_202,1),COLOR999900,LINETHICK2;
压力通道:TRENDLINES(CURRBARSCOUNT=HJ_171,HIGH-HJ_202,CURRBARSCOUNT=HJ_169,HIGH-HJ_202);
DRAWNUMBER(HJ_150=1,止损位,止损位,2,COLOR00CCCC);
DRAWNUMBER(HJ_150=2,止盈位,止盈位,2,COLORCCCC00);
IF(CAPITAL>0 AND CLOSE<500,0,HJ_132),COLORDDDDDD;
COST(50),COLOR0000CC,LINETHICK2;
IF(平均成本<MA(平均成本,2),平均成本,NULL),COLOR00CC00,LINETHICK2;
COST(80)*0.9998,COLORWHITE;
DRAWNUMBER(ISLASTBAR,短线盈损,短线盈损,2,COLOR00DDDD);
DRAWNUMBER(ISLASTBAR,生命线,生命线,2,COLOR00DDDD);
HJ_1:=7;
HJ_2:=7;
HJ_3:=10;
//DRAWGBK(CLOSE>0,RGB(1,1,1),RGB(1,1,1),0,0,1);
CURRBARSCOUNT1:=DATACOUNT-BARPOS+1,NODRAW;
平均成本:=COST(50),COLORRED;
HJ_4:=0;
HJ_5:=0;
HJ_6:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJ_7:=IF(CLOSE<500 ,0,(20*HJ_6+19*REF(HJ_6,1)+18*REF(HJ_6,2)+17*REF(HJ_6,3)+16*REF(HJ_6,4)+15*REF(HJ_6,5)+14*REF(HJ_6,6)+13*REF(HJ_6,7)+12*REF(HJ_6,8)+11*REF(HJ_6,9)+10*REF(HJ_6,10)+9*REF(HJ_6,11)+8*REF(HJ_6,12)+7*REF(HJ_6,13)+6*REF(HJ_6,14)+5*REF(HJ_6,15)+4*REF(HJ_6,16)+3*REF(HJ_6,17)+2*REF(HJ_6,18)+REF(HJ_6,20))/210);
HJ_8:=IF(CLOSE<500 ,0,MA(HJ_7,5));
主力成本:IF(CLOSE<500 ,0,(HJ_7+HJ_8)/2),COLOR0000CC;
//DRAWBAND(HJ_7,RGB(99,0,0),HJ_8,RGB(0,99,0));
FILLRGN(HJ_7>HJ_8,HJ_7,HJ_8),COLOR00005A;
FILLRGN(HJ_7<HJ_8,HJ_7,HJ_8),COLOR006300;
生命线:COST(80)*0.9998,COLORWHITE;
HJ_9:=LOW>REF(HIGH,1)+0.001;
HJ_10:=BARSLAST(HJ_9);
HJ_11:=COUNT(LOW>REF(HIGH,HJ_10+1),HJ_10+1)=HJ_10+1;
HJ_12:=CROSS(BACKSET(HJ_11>0 AND ISLASTBAR,HJ_10+1),0.5);
HJ_13:=BARSLAST(HJ_12);
HJ_14:=IF(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),REFX(LLV(LOW,HJ_13+1),DATACOUNT-BARPOS),DRAWNULL);
HJ_15:=IF(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),REF(HIGH,HJ_13+1),DRAWNULL);
STICKLINE(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),HJ_14,HJ_15,15,0),COLORGRAY;
HJ_16:=HIGH<REF(LOW,1)-0.001;
HJ_17:=BARSLAST(HJ_16);
HJ_18:=COUNT(HIGH<REF(LOW,HJ_17+1),HJ_17+1)=HJ_17+1;
HJ_19:=CROSS(BACKSET(HJ_18>0 AND ISLASTBAR,HJ_17+1),0.5);
HJ_20:=BARSLAST(HJ_19);
HJ_21:=IF(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),REFX(HHV(HIGH,HJ_20+1),DATACOUNT-BARPOS),DRAWNULL);
HJ_22:=IF(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),REF(LOW,HJ_20+1),DRAWNULL);
STICKLINE(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),HJ_21,HJ_22,15,0),COLORGRAY;
HJ_23:=COST(1);
HJ_24:=COST(10);
HJ_25:=COST(20);
HJ_26:=COST(30);
HJ_27:=COST(40);
HJ_28:=COST(50);
HJ_29:=COST(60);
HJ_30:=COST(70);
HJ_31:=COST(80);
HJ_32:=COST(90);
HJ_33:=COST(99);
HJ_34:=COST(5);
HJ_35:=COST(15);
HJ_36:=COST(25);
HJ_37:=COST(35);
HJ_38:=COST(45);
HJ_39:=COST(55);
HJ_40:=COST(65);
HJ_41:=COST(75);
HJ_42:=COST(85);
HJ_43:=COST(95);
HJ_44:=HJ_34-HJ_23;
HJ_45:=HJ_24-HJ_34;
HJ_46:=HJ_35-HJ_24;
HJ_47:=HJ_25-HJ_35;
HJ_48:=HJ_36-HJ_25;
HJ_49:=HJ_26-HJ_36;
HJ_50:=HJ_37-HJ_26;
HJ_51:=HJ_27-HJ_37;
HJ_52:=HJ_38-HJ_27;
HJ_53:=HJ_28-HJ_38;
HJ_54:=HJ_39-HJ_28;
HJ_55:=HJ_29-HJ_39;
HJ_56:=HJ_40-HJ_29;
HJ_57:=HJ_30-HJ_40;
HJ_58:=HJ_41-HJ_30;
HJ_59:=HJ_31-HJ_41;
HJ_60:=HJ_42-HJ_31;
HJ_61:=HJ_32-HJ_42;
HJ_62:=HJ_43-HJ_32;
HJ_63:=HJ_33-HJ_43;
HJ_64:=MIN(HJ_44,MIN(HJ_45,MIN(HJ_46,MIN(HJ_47,MIN(HJ_48,MIN(HJ_49,MIN(HJ_50,MIN(HJ_51,MIN(HJ_52,MIN(HJ_53,MIN(HJ_54,MIN(HJ_55,MIN(HJ_56,MIN(HJ_57,MIN(HJ_58,MIN(HJ_59,MIN(HJ_60,MIN(HJ_61,MIN(HJ_62,HJ_63)))))))))))))))))));
HJ_65:=IF(HJ_5=1,0,HJ_64);
STICKLINE(HJ_65=HJ_44,HJ_23,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_45,HJ_24,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_46,HJ_35,HJ_24,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_47,HJ_25,HJ_35,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_48,HJ_36,HJ_25,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_49,HJ_26,HJ_36,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_50,HJ_37,HJ_26,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_51,HJ_27,HJ_37,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_52,HJ_38,HJ_27,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_53,HJ_28,HJ_38,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_54,HJ_39,HJ_28,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_55,HJ_29,HJ_39,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_56,HJ_40,HJ_29,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_57,HJ_30,HJ_40,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_58,HJ_41,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_59,HJ_31,HJ_41,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_60,HJ_42,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_61,HJ_32,HJ_42,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_62,HJ_43,HJ_32,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_63,HJ_33,HJ_43,5,0),COLORFF8800;
HJ_66:=IF(HJ_4=1,0,HJ_33-HJ_23);
HJ_67:=HJ_32-HJ_29;
HJ_68:=HJ_31-HJ_28;
HJ_69:=HJ_30-HJ_27;
HJ_70:=HJ_29-HJ_26;
HJ_71:=HJ_28-HJ_25;
HJ_72:=HJ_27-HJ_24;
HJ_73:=HJ_26-HJ_23;
STICKLINE(HJ_67/HJ_66<0.08,HJ_32,HJ_29,5,0),COLOR004455;
STICKLINE(HJ_68/HJ_66<0.08,HJ_31,HJ_28,5,0),COLOR004455;
STICKLINE(HJ_69/HJ_66<0.08,HJ_30,HJ_27,5,0),COLOR004455;
STICKLINE(HJ_70/HJ_66<0.08,HJ_29,HJ_26,5,0),COLOR004455;
STICKLINE(HJ_71/HJ_66<0.08,HJ_28,HJ_25,5,0),COLOR004455;
STICKLINE(HJ_72/HJ_66<0.08,HJ_27,HJ_24,5,0),COLOR004455;
HJ_74:=HJ_32-HJ_30;
HJ_75:=HJ_31-HJ_29;
HJ_76:=HJ_30-HJ_28;
HJ_77:=HJ_29-HJ_27;
HJ_78:=HJ_28-HJ_26;
HJ_79:=HJ_27-HJ_25;
HJ_80:=HJ_26-HJ_24;
STICKLINE(HJ_74/HJ_66<0.05,HJ_32,HJ_30,5,0),COLOR554400;
STICKLINE(HJ_75/HJ_66<0.05,HJ_31,HJ_29,5,0),COLOR554400;
STICKLINE(HJ_76/HJ_66<0.05,HJ_30,HJ_28,5,0),COLOR554400;
STICKLINE(HJ_77/HJ_66<0.05,HJ_29,HJ_27,5,0),COLOR554400;
STICKLINE(HJ_78/HJ_66<0.05,HJ_28,HJ_26,5,0),COLOR554400;
STICKLINE(HJ_79/HJ_66<0.05,HJ_27,HJ_25,5,0),COLOR554400;
STICKLINE(HJ_80/HJ_66<0.05,HJ_26,HJ_24,5,0),COLOR554400;
HJ_81:=MA(CLOSE,20);
HJ_82:=BARSLAST(CLOSE<HJ_81);
HJ_83:=BACKSET((HJ_82>=4)*HJ_82,HJ_82);
HJ_84:=BARSLAST(CLOSE>HJ_81);
HJ_85:=BACKSET((HJ_84>=4)*HJ_84,HJ_84);
HJ_86:=BARSLAST(NOT(HJ_83 OR HJ_85));
HJ_87:=BARSLAST(REF(HJ_83>0,HJ_86));
HJ_88:=BARSLAST(REF(HJ_85>0,HJ_86));
HJ_89:=IF(HJ_4=1,0,(LLV(LOW,HJ_87)=LOW));
HJ_90:=IF(HJ_5=1,0,(HHV(HIGH,HJ_88)=HIGH));
HJ_91:=IF(HJ_4=1,0,REF(HIGH,BARSLAST(HJ_90)));
HJ_92:=IF(HJ_5=1,0,REF(LOW,BARSLAST(HJ_89)));
HJ_93:=BARSLAST(HJ_87=1);
HJ_94:=REF(HJ_91,BARSLAST(HJ_87));
HJ_95:=REF(HJ_92,HJ_93);
HJ_96:=(HJ_94-HJ_95)*0.191+HJ_95;
HJ_97:=(HJ_94-HJ_95)*0.382+HJ_95;
HJ_98:=(HJ_94-HJ_95)*0.5+HJ_95;
HJ_99:=(HJ_94-HJ_95)*0.618+HJ_95;
HJ_100:=(HJ_94-HJ_95)*0.809+HJ_95;
HJ_101:=HJ_94+(HJ_94-HJ_95)*0.191;
HJ_102:=HJ_95-(HJ_94-HJ_95)*0.191;
HJ_103:=REFX(HJ_95,DATACOUNT-BARPOS);
HJ_104:=REFX(HJ_97,DATACOUNT-BARPOS);
HJ_105:=REFX(HJ_99,DATACOUNT-BARPOS);
HJ_106:=REFX(HJ_94,DATACOUNT-BARPOS);
HJ_107:=REFX(HJ_101,DATACOUNT-BARPOS);
HJ_108:=REFX(HJ_102,DATACOUNT-BARPOS);
//DRAWBAND(HJ_103,RGB(68,68,0),HJ_108,RGB(68,68,0));
FILLRGN(HJ_103>HJ_108,HJ_103,HJ_108),COLOR004444;
FILLRGN(HJ_103<HJ_108,HJ_103,HJ_108),COLOR004444;
//DRAWBAND(HJ_107,RGB(78,78,0),HJ_106,RGB(78,78,0));
FILLRGN(HJ_107>HJ_106,HJ_107,HJ_106),COLOR004E4E;
FILLRGN(HJ_107<HJ_106,HJ_107,HJ_106),COLOR004E4E;
HJ_109:=IF(DATAPERIOD=7,7,IF(DATAPERIOD=6,14,30));
HJ_110:=IF(DATAPERIOD=7,8,IF(DATAPERIOD=6,16,35));
HJ_111:=IF(DATAPERIOD=7,9,IF(DATAPERIOD=6,18,40));
HJ_112:=IF(DATAPERIOD=7,10,IF(DATAPERIOD=6,20,45));
HJ_113:=IF(DATAPERIOD=7,11,IF(DATAPERIOD=6,22,50));
HJ_114:=IF(DATAPERIOD=7,12,IF(DATAPERIOD=6,24,55));
HJ_115:=EMA(CLOSE,HJ_109);
HJ_116:=EMA(CLOSE,HJ_110);
HJ_117:=EMA(CLOSE,HJ_111);
HJ_118:=EMA(CLOSE,HJ_112);
HJ_119:=EMA(CLOSE,HJ_113);
HJ_120:=EMA(CLOSE,HJ_114);
HJ_121:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
NOTEXTM1:IF(CLOSE>0 AND HJ_121,HJ_115,DRAWNULL),COLOR005500;
NOTEXTM2:IF(CLOSE>0 AND HJ_121,HJ_116,DRAWNULL),COLOR007700;
NOTEXTM3:IF(CLOSE>0 AND HJ_121,HJ_117,DRAWNULL),COLOR009900;
NOTEXTM4:IF(CLOSE>0 AND HJ_121,HJ_118,DRAWNULL),COLOR00BB00;
NOTEXTM5:IF(CLOSE>0 AND HJ_121,HJ_119,DRAWNULL),COLOR00DD00;
NOTEXTM6:IF(CLOSE>0 AND HJ_121,HJ_120,DRAWNULL),COLORGREEN;
NOTEXTM11:IF(HJ_115>REF(HJ_115,1) AND HJ_121,HJ_115,DRAWNULL),COLOR550055;
NOTEXTM22:IF(HJ_116>REF(HJ_116,1) AND HJ_121,HJ_116,DRAWNULL),COLOR770077;
NOTEXTM33:IF(HJ_117>REF(HJ_117,1) AND HJ_121,HJ_117,DRAWNULL),COLOR990099;
NOTEXTM44:IF(HJ_118>REF(HJ_118,1) AND HJ_121,HJ_118,DRAWNULL),COLORBB00BB;
NOTEXTM55:IF(HJ_119>REF(HJ_119,1) AND HJ_121,HJ_119,DRAWNULL),COLORDD00DD;
NOTEXTM66:IF(HJ_120>REF(HJ_120,1) AND HJ_121,HJ_120,DRAWNULL),COLORMAGENTA;
HJ_122:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT大盘:IF(CLOSE<500 ,(INDEXC/HJ_122+0.812*REF(INDEXC/HJ_122,1)+0.618*REF(INDEXC/HJ_122,2)+0.382*REF(INDEXC/HJ_122,3)+0.191*REF(INDEXC/HJ_122,4))/3.003,DRAWNULL),COLOR008888;
HJ_123:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT行业:IF(CLOSE<500 ,(INDEXC/HJ_123+0.812*REF(INDEXC/HJ_123,1)+0.618*REF(INDEXC/HJ_123,2)+0.382*REF(INDEXC/HJ_123,3)+0.191*REF(INDEXC/HJ_123,4))/3.003,DRAWNULL),COLOR888888;
HJ_124:=(CLOSE+0.812*REF(CLOSE,1)+0.618*REF(CLOSE,2)+0.382*REF(CLOSE,3)+0.191*REF(CLOSE,4))/3.003;
STICKLINE(HJ_124>NOTEXT行业 AND HJ_124>NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLORBB00BB;
STICKLINE(HJ_124<NOTEXT行业 AND HJ_124<NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLOR00BB00;
HJ_125:=DAY<>REF(DAY,1);
HJ_126:=BARSLAST(HJ_125)+1;
HJ_127:=VOL*(CLOSE+LOW+HIGH)/3;
HJ_128:=SUM(HJ_127,HJ_126)/SUM(VOL,HJ_126);
HJ_129:=SUM(AMOUNT,HJ_126)/SUM(VOL,HJ_126)/100;
HJ_130:=IF(CLOSE<500,HJ_129,HJ_128);
HJ_131:=IF(HJ_125<=REFX(HJ_126,DATACOUNT-BARPOS),HJ_128,DRAWNULL);
HJ_132:=REF(HJ_131,1)*1.0001;
短线盈损:IF( CLOSE<500,0,HJ_132),COLORDDDDDD;
HJ_133:=REFX(MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1),30),DATACOUNT-BARPOS);
HJ_134:=MA(CLOSE,1);
HJ_135:=SMA(SMA(HJ_134,2,1),2,1);
HJ_136:=MA(HJ_135,3);
HJ_137:=IF(CROSS(HJ_89,0.5),1,IF(CROSS(HJ_90,0.5),(-1),0));
HJ_138:=IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135>HJ_136,1,IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135<=HJ_136,(-1),HJ_137));
HJ_139:=REF(HJ_138,BARSLAST(HJ_138));
HJ_140:=ZIG(C,HJ_3,1);
HJ_141:=PEAK(C,HJ_3,1,1);
HJ_142:=TROUGH(C,HJ_3,1,1);
HJ_143:=HJ_140>REF(HJ_140,1);
HJ_144:=HJ_140<=REF(HJ_140,1);
HJ_145:=IF(HJ_4=1,0,REF(HJ_139=1,1));
HJ_146:=IF(HJ_5=1,0,REF(HJ_139=(-1),1));
HJ_147:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
HJ_148:=IF(HJ_147,HJ_145,IF(DATAPERIOD>=5,HJ_143,HJ_145));
HJ_149:=IF(HJ_147,HJ_146,IF(DATAPERIOD>=5,HJ_144,HJ_146));
HJ_150:=IF(CROSS(HJ_148=1,0.5)||CROSS(HJ_149=1,0.5),1,0);
HJ_151:=HJ_150=1;
HJ_152:=IF(HJ_151,LLV(LOW,2),0);
HJ_153:=IF(HJ_152=0,REF(HJ_152,BARSLAST(HJ_151)),HJ_152);
IF(HJ_153=REF(HJ_153,1),HJ_153,DRAWNULL),COLOR00CCCC;
HJ_154:=HJ_150=2;
HJ_155:=IF(HJ_154,HHV(HIGH,2),0);
HJ_156:=IF(HJ_155=0,REF(HJ_155,BARSLAST(HJ_154)),HJ_155);
IF(HJ_156=REF(HJ_156,1),HJ_156,DRAWNULL),COLORCCCC00;
HJ_157:=BARSLAST(HJ_150=1);
止损位:MIN(REF(CLOSE,HJ_157),REF(CLOSE,HJ_157+1)),NODRAW,COLOR00CCCC;
HJ_158:=BARSLAST(HJ_150=2);
止盈位:MAX(REF(CLOSE,HJ_158),REF(CLOSE,HJ_158+1)),NODRAW,COLORCCCC00;
IF(止盈位=REF(止盈位,1),止盈位,DRAWNULL),POINTDOT,COLORCCCC00;
IF(止损位=REF(止损位,1),止损位,DRAWNULL),POINTDOT,COLOR00CCCC;
STICKLINE(HJ_148,HIGH,LOW,1,0),COLORGREEN;
STICKLINE(HJ_148 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORGREEN;
STICKLINE(HJ_148 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORGREEN;
STICKLINE(HJ_149,HIGH,LOW,0,0),COLORRED;
STICKLINE(HJ_149 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORRED;
STICKLINE(HJ_149 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORRED;
HJ_159:=IF((CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=10-0.01*100/REF(OPEN,1),1,0);
STICKLINE(HJ_159,OPEN,CLOSE,0,0),COLORYELLOW;
HJ_160:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(HJ_160<(-9.9),OPEN,CLOSE,0.3,0),COLORBLUE;
HJ_161:=REF(HIGH,HJ_1)=HHV(HIGH,2*HJ_1+1);
HJ_162:=BACKSET(HJ_161,HJ_1+1);
HJ_163:=FILTER(HJ_162,HJ_1) AND HIGH=HHV(HIGH,HJ_1+1);
HJ_164:=IF(HJ_4=1,0,BARSLAST(HJ_163));
HJ_165:=IF(HJ_163,CURRBARSCOUNT1,0);
HJ_166:=IF(HJ_164,REF(HIGH,HJ_164),HIGH);
HJ_167:=IF(HJ_164,REF(HJ_165,HJ_164),HJ_165);
HJ_168:=REF(HJ_166,HJ_164+1);
HJ_169:=REFX(HJ_167,DATACOUNT-BARPOS);
HJ_170:=REF(HJ_167,HJ_164+1);
HJ_171:=REFX(HJ_170,DATACOUNT-BARPOS);
HJ_172:=REF(HJ_168,HJ_164+1);
HJ_173:=IF(CURRBARSCOUNT1>HJ_171,0,1);
DRAWLINE(CURRBARSCOUNT1=HJ_171,HIGH,CURRBARSCOUNT1=HJ_169,HIGH,0);
压力线:IF(H>REF(H,1),DRAWNULL,H),COLOR999900,LINETHICK3;
HJ_175:=REF(LOW,HJ_2)=LLV(LOW,2*HJ_2+1);
HJ_176:=BACKSET(HJ_175,HJ_2+1);
HJ_177:=FILTER(HJ_176,HJ_2) AND LOW=LLV(LOW,HJ_2+1);
HJ_178:=IF(HJ_5=1,0,BARSLAST(HJ_177));
HJ_179:=IF(HJ_177,CURRBARSCOUNT1,0);
HJ_180:=IF(HJ_178,REF(LOW,HJ_178),LOW);
HJ_181:=IF(HJ_178,REF(HJ_179,HJ_178),HJ_179);
HJ_182:=REFX(HJ_181,DATACOUNT-BARPOS);
HJ_183:=REF(HJ_180,HJ_178+1);
HJ_184:=REF(HJ_181,HJ_178+1);
HJ_185:=REFX(HJ_184,DATACOUNT-BARPOS);
DRAWLINE(CURRBARSCOUNT1=HJ_185,LOW,CURRBARSCOUNT1=HJ_182,LOW,0);
支撑线:IF(L<REF(L,1),DRAWNULL,L),COLOR990099,LINETHICK3;
HJ_187:=BACKSET(BARSTATUS=2,BARSLAST(HJ_163)+1);
HJ_188:=HJ_187>REF(HJ_187,1);
HJ_189:=BACKSET(BARSTATUS=2,BARSLAST(HJ_177)+1);
HJ_190:=HJ_189>REF(HJ_189,1);
HJ_191:=BACKSET(HJ_188,REF(BARSLAST(HJ_163),1)+2);
HJ_192:=HJ_191>REF(HJ_191,1);
HJ_193:=BACKSET(HJ_190,REF(BARSLAST(HJ_177),1)+2);
HJ_194:=HJ_193>REF(HJ_193,1);
HJ_195:=BARSLAST(HJ_190)+1;
HJ_196:=BARSLAST(HJ_194)+1;
HJ_197:=IF(HJ_195=DRAWNULL AND HJ_196>0 AND HJ_163 AND HJ_4<>1,HIGH,DRAWNULL);
HJ_198:=BARSLAST(HJ_188)+1;
HJ_199:=BARSLAST(HJ_192)+1;
HJ_200:=IF(HJ_198=DRAWNULL AND HJ_199>0 AND HJ_177 AND HJ_5<>1,LOW,DRAWNULL);
HJ_201:=REFX(HHV(HJ_197-支撑线,0),DATACOUNT-BARPOS);
HJ_202:=REFX(HHV(压力线-HJ_200,0),DATACOUNT-BARPOS);
DRAWLINE(CURRBARSCOUNT1=HJ_185,LOW+HJ_201,CURRBARSCOUNT1=HJ_182,LOW+HJ_201,1),COLOR990099,LINETHICK2;
DRAWLINE(CURRBARSCOUNT1=HJ_171,HIGH-HJ_202,CURRBARSCOUNT1=HJ_169,HIGH-HJ_202,1),COLOR999900,LINETHICK2;
DRAWNUMBER(HJ_150=1,止损位,止损位,2),COLOR00CCCC;
DRAWNUMBER(HJ_150=2,止盈位,止盈位,2),COLORCCCC00;
IF(平均成本<MA(平均成本,2),平均成本,DRAWNULL),COLOR00CC00,LINETHICK2;
DRAWNUMBER(ISLASTBAR,短线盈损,短线盈损,2),COLOR00DDDD;
DRAWNUMBER(ISLASTBAR,生命线,生命线,2),COLOR00DDDD; 来源 程序化久久网
请老师修改一下
HJ_1:=7;HJ_2:=7;
HJ_3:=10;
//DRAWGBK(CLOSE>0,RGB(1,1,1),RGB(1,1,1),0,0,1);
AMOUNT:=AVPRICE*V;
CAPITAL:=GETPRICE1('流通股本');
INDEXL:="999001$L";
INDEXC:="999001$C";
INDEXH:="999001$H";
CURRBARSCOUNT:=DATACOUNT-BARPOS+1,NODRAW;
平均成本:COST(50),COLORRED;
HJ_4:=0;
HJ_5:=0;
HJ_6:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJ_7:=IF(CLOSE<500 ,0,(20*HJ_6+19*REF(HJ_6,1)+18*REF(HJ_6,2)+17*REF(HJ_6,3)+16*REF(HJ_6,4)+15*REF(HJ_6,5)+14*REF(HJ_6,6)+13*REF(HJ_6,7)+12*REF(HJ_6,8)+11*REF(HJ_6,9)+10*REF(HJ_6,10)+9*REF(HJ_6,11)+8*REF(HJ_6,12)+7*REF(HJ_6,13)+6*REF(HJ_6,14)+5*REF(HJ_6,15)+4*REF(HJ_6,16)+3*REF(HJ_6,17)+2*REF(HJ_6,18)+REF(HJ_6,20))/210);
HJ_8:=IF(CLOSE<500 ,0,MA(HJ_7,5));
主力成本:IF(CLOSE<500 ,0,(HJ_7+HJ_8)/2),COLOR0000CC;
//DRAWBAND(HJ_7,RGB(99,0,0),HJ_8,RGB(0,99,0));
FILLRGN(HJ_7>HJ_8,HJ_7,HJ_8,RGB(99,0,0));
FILLRGN(HJ_7<HJ_8,HJ_7,HJ_8,RGB(0,99,0));
生命线:COST(80)*0.9998,COLORWHITE;
HJ_9:=LOW>REF(HIGH,1)+0.001;
HJ_10:=BARSLAST(HJ_9);
HJ_11:=COUNT(LOW>REF(HIGH,HJ_10+1),HJ_10+1)=HJ_10+1;
HJ_12:=CROSS(BACKSET(HJ_11>0 AND ISLASTBAR,HJ_10+1),0.5);
HJ_13:=BARSLAST(HJ_12);
HJ_14:=IF(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),REFX1(LLV(LOW,HJ_13+1),10000),NULL);
HJ_15:=IF(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),REF(HIGH,HJ_13+1),NULL);
STICKLINE(CURRBARSCOUNT<=REFX1(HJ_13+1,10000),HJ_14,HJ_15,15,0),COLORGRAY;
HJ_16:=HIGH<REF(LOW,1)-0.001;
HJ_17:=BARSLAST(HJ_16);
HJ_18:=COUNT(HIGH<REF(LOW,HJ_17+1),HJ_17+1)=HJ_17+1;
HJ_19:=CROSS(BACKSET(HJ_18>0 AND ISLASTBAR,HJ_17+1),0.5);
HJ_20:=BARSLAST(HJ_19);
HJ_21:=IF(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),REFX1(HHV(HIGH,HJ_20+1),10000),NULL);
HJ_22:=IF(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),REF(LOW,HJ_20+1),NULL);
STICKLINE(CURRBARSCOUNT<=REFX1(HJ_20+1,10000),HJ_21,HJ_22,15,0),COLORGRAY;
HJ_23:=COST(1);
HJ_24:=COST(10);
HJ_25:=COST(20);
HJ_26:=COST(30);
HJ_27:=COST(40);
HJ_28:=COST(50);
HJ_29:=COST(60);
HJ_30:=COST(70);
HJ_31:=COST(80);
HJ_32:=COST(90);
HJ_33:=COST(99);
HJ_34:=COST(5);
HJ_35:=COST(15);
HJ_36:=COST(25);
HJ_37:=COST(35);
HJ_38:=COST(45);
HJ_39:=COST(55);
HJ_40:=COST(65);
HJ_41:=COST(75);
HJ_42:=COST(85);
HJ_43:=COST(95);
HJ_44:=HJ_34-HJ_23;
HJ_45:=HJ_24-HJ_34;
HJ_46:=HJ_35-HJ_24;
HJ_47:=HJ_25-HJ_35;
HJ_48:=HJ_36-HJ_25;
HJ_49:=HJ_26-HJ_36;
HJ_50:=HJ_37-HJ_26;
HJ_51:=HJ_27-HJ_37;
HJ_52:=HJ_38-HJ_27;
HJ_53:=HJ_28-HJ_38;
HJ_54:=HJ_39-HJ_28;
HJ_55:=HJ_29-HJ_39;
HJ_56:=HJ_40-HJ_29;
HJ_57:=HJ_30-HJ_40;
HJ_58:=HJ_41-HJ_30;
HJ_59:=HJ_31-HJ_41;
HJ_60:=HJ_42-HJ_31;
HJ_61:=HJ_32-HJ_42;
HJ_62:=HJ_43-HJ_32;
HJ_63:=HJ_33-HJ_43;
HJ_64:=MIN(HJ_44,MIN(HJ_45,MIN(HJ_46,MIN(HJ_47,MIN(HJ_48,MIN(HJ_49,MIN(HJ_50,MIN(HJ_51,MIN(HJ_52,MIN(HJ_53,MIN(HJ_54,MIN(HJ_55,MIN(HJ_56,MIN(HJ_57,MIN(HJ_58,MIN(HJ_59,MIN(HJ_60,MIN(HJ_61,MIN(HJ_62,HJ_63)))))))))))))))))));
HJ_65:=IF(HJ_5=1,0,HJ_64);
STICKLINE(HJ_65=HJ_44,HJ_23,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_45,HJ_24,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_46,HJ_35,HJ_24,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_47,HJ_25,HJ_35,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_48,HJ_36,HJ_25,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_49,HJ_26,HJ_36,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_50,HJ_37,HJ_26,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_51,HJ_27,HJ_37,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_52,HJ_38,HJ_27,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_53,HJ_28,HJ_38,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_54,HJ_39,HJ_28,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_55,HJ_29,HJ_39,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_56,HJ_40,HJ_29,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_57,HJ_30,HJ_40,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_58,HJ_41,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_59,HJ_31,HJ_41,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_60,HJ_42,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_61,HJ_32,HJ_42,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_62,HJ_43,HJ_32,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_63,HJ_33,HJ_43,5,0),COLORFF8800;
HJ_66:=IF(HJ_4=1,0,HJ_33-HJ_23);
HJ_67:=HJ_32-HJ_29;
HJ_68:=HJ_31-HJ_28;
HJ_69:=HJ_30-HJ_27;
HJ_70:=HJ_29-HJ_26;
HJ_71:=HJ_28-HJ_25;
HJ_72:=HJ_27-HJ_24;
HJ_73:=HJ_26-HJ_23;
STICKLINE(HJ_67/HJ_66<0.08,HJ_32,HJ_29,5,0),COLOR004455;
STICKLINE(HJ_68/HJ_66<0.08,HJ_31,HJ_28,5,0),COLOR004455;
STICKLINE(HJ_69/HJ_66<0.08,HJ_30,HJ_27,5,0),COLOR004455;
STICKLINE(HJ_70/HJ_66<0.08,HJ_29,HJ_26,5,0),COLOR004455;
STICKLINE(HJ_71/HJ_66<0.08,HJ_28,HJ_25,5,0),COLOR004455;
STICKLINE(HJ_72/HJ_66<0.08,HJ_27,HJ_24,5,0),COLOR004455;
HJ_74:=HJ_32-HJ_30;
HJ_75:=HJ_31-HJ_29;
HJ_76:=HJ_30-HJ_28;
HJ_77:=HJ_29-HJ_27;
HJ_78:=HJ_28-HJ_26;
HJ_79:=HJ_27-HJ_25;
HJ_80:=HJ_26-HJ_24;
STICKLINE(HJ_74/HJ_66<0.05,HJ_32,HJ_30,5,0),COLOR554400;
STICKLINE(HJ_75/HJ_66<0.05,HJ_31,HJ_29,5,0),COLOR554400;
STICKLINE(HJ_76/HJ_66<0.05,HJ_30,HJ_28,5,0),COLOR554400;
STICKLINE(HJ_77/HJ_66<0.05,HJ_29,HJ_27,5,0),COLOR554400;
STICKLINE(HJ_78/HJ_66<0.05,HJ_28,HJ_26,5,0),COLOR554400;
STICKLINE(HJ_79/HJ_66<0.05,HJ_27,HJ_25,5,0),COLOR554400;
STICKLINE(HJ_80/HJ_66<0.05,HJ_26,HJ_24,5,0),COLOR554400;
HJ_81:=MA(CLOSE,20);
HJ_82:=BARSLASTCOUNT(CLOSE<HJ_81);
HJ_83:=BACKSET((HJ_82>=4)*HJ_82,HJ_82);
HJ_84:=BARSLASTCOUNT(CLOSE>HJ_81);
HJ_85:=BACKSET((HJ_84>=4)*HJ_84,HJ_84);
HJ_86:=BARSLASTCOUNT(NOT(HJ_83 OR HJ_85));
HJ_87:=BARSLASTCOUNT(REF(HJ_83>0,HJ_86));
HJ_88:=BARSLASTCOUNT(REF(HJ_85>0,HJ_86));
HJ_89:=IF(HJ_4=1,0,(LLV(LOW,HJ_87)=LOW));
HJ_90:=IF(HJ_5=1,0,(HHV(HIGH,HJ_88)=HIGH));
HJ_91:=IF(HJ_4=1,0,REF(HIGH,BARSLAST(HJ_90)));
HJ_92:=IF(HJ_5=1,0,REF(LOW,BARSLAST(HJ_89)));
HJ_93:=BARSLAST(HJ_87=1);
HJ_94:=REF(HJ_91,BARSLAST(HJ_87));
HJ_95:=REF(HJ_92,HJ_93);
HJ_96:=(HJ_94-HJ_95)*0.191+HJ_95;
HJ_97:=(HJ_94-HJ_95)*0.382+HJ_95;
HJ_98:=(HJ_94-HJ_95)*0.5+HJ_95;
HJ_99:=(HJ_94-HJ_95)*0.618+HJ_95;
HJ_100:=(HJ_94-HJ_95)*0.809+HJ_95;
HJ_101:=HJ_94+(HJ_94-HJ_95)*0.191;
HJ_102:=HJ_95-(HJ_94-HJ_95)*0.191;
HJ_103:=REFX1(HJ_95,10000);
HJ_104:=REFX1(HJ_97,10000);
HJ_105:=REFX1(HJ_99,10000);
HJ_106:=REFX1(HJ_94,10000);
HJ_107:=REFX1(HJ_101,10000);
HJ_108:=REFX1(HJ_102,10000);
//DRAWBAND(HJ_103,RGB(68,68,0),HJ_108,RGB(68,68,0));
FILLRGN(HJ_103>HJ_108,HJ_103,HJ_108,RGB(68,68,0));
FILLRGN(HJ_103<HJ_108,HJ_103,HJ_108,RGB(68,68,0));
//DRAWBAND(HJ_107,RGB(78,78,0),HJ_106,RGB(78,78,0));
FILLRGN(HJ_107>HJ_106,HJ_107,HJ_106,RGB(78,78,0));
FILLRGN(HJ_107<HJ_106,HJ_107,HJ_106,RGB(78,78,0));
HJ_109:=IF(PERIOD=7,7,IF(PERIOD=6,14,30));
HJ_110:=IF(PERIOD=7,8,IF(PERIOD=6,16,35));
HJ_111:=IF(PERIOD=7,9,IF(PERIOD=6,18,40));
HJ_112:=IF(PERIOD=7,10,IF(PERIOD=6,20,45));
HJ_113:=IF(PERIOD=7,11,IF(PERIOD=6,22,50));
HJ_114:=IF(PERIOD=7,12,IF(PERIOD=6,24,55));
HJ_115:=EMA(CLOSE,HJ_109);
HJ_116:=EMA(CLOSE,HJ_110);
HJ_117:=EMA(CLOSE,HJ_111);
HJ_118:=EMA(CLOSE,HJ_112);
HJ_119:=EMA(CLOSE,HJ_113);
HJ_120:=EMA(CLOSE,HJ_114);
HJ_121:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
NOTEXTM1:IF(CLOSE>0 AND HJ_121,HJ_115,NULL),COLOR005500;
NOTEXTM2:IF(CLOSE>0 AND HJ_121,HJ_116,NULL),COLOR007700;
NOTEXTM3:IF(CLOSE>0 AND HJ_121,HJ_117,NULL),COLOR009900;
NOTEXTM4:IF(CLOSE>0 AND HJ_121,HJ_118,NULL),COLOR00BB00;
NOTEXTM5:IF(CLOSE>0 AND HJ_121,HJ_119,NULL),COLOR00DD00;
NOTEXTM6:IF(CLOSE>0 AND HJ_121,HJ_120,NULL),COLORGREEN;
NOTEXTM11:IF(HJ_115>REF(HJ_115,1) AND HJ_121,HJ_115,NULL),COLOR550055;
NOTEXTM22:IF(HJ_116>REF(HJ_116,1) AND HJ_121,HJ_116,NULL),COLOR770077;
NOTEXTM33:IF(HJ_117>REF(HJ_117,1) AND HJ_121,HJ_117,NULL),COLOR990099;
NOTEXTM44:IF(HJ_118>REF(HJ_118,1) AND HJ_121,HJ_118,NULL),COLORBB00BB;
NOTEXTM55:IF(HJ_119>REF(HJ_119,1) AND HJ_121,HJ_119,NULL),COLORDD00DD;
NOTEXTM66:IF(HJ_120>REF(HJ_120,1) AND HJ_121,HJ_120,NULL),COLORMAGENTA;
HJ_122:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT大盘:IF(CLOSE<500 ,(INDEXC/HJ_122+0.812*REF(INDEXC/HJ_122,1)+0.618*REF(INDEXC/HJ_122,2)+0.382*REF(INDEXC/HJ_122,3)+0.191*REF(INDEXC/HJ_122,4))/3.003,NULL),COLOR008888;
HJ_123:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT行业:IF(CLOSE<500 ,(INDEXC/HJ_123+0.812*REF(INDEXC/HJ_123,1)+0.618*REF(INDEXC/HJ_123,2)+0.382*REF(INDEXC/HJ_123,3)+0.191*REF(INDEXC/HJ_123,4))/3.003,NULL),COLOR888888;
HJ_124:=(CLOSE+0.812*REF(CLOSE,1)+0.618*REF(CLOSE,2)+0.382*REF(CLOSE,3)+0.191*REF(CLOSE,4))/3.003;
STICKLINE(HJ_124>NOTEXT行业 AND HJ_124>NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLORBB00BB;
STICKLINE(HJ_124<NOTEXT行业 AND HJ_124<NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLOR00BB00;
HJ_125:=DAY<>REF(DAY,1);
HJ_126:=BARSLAST(HJ_125)+1;
HJ_127:=VOL*(CLOSE+LOW+HIGH)/3;
HJ_128:=SUM(HJ_127,HJ_126)/SUM(VOL,HJ_126);
HJ_129:=SUM(AMOUNT,HJ_126)/SUM(VOL,HJ_126)/100;
HJ_130:=IF(CLOSE<500,HJ_129,HJ_128);
HJ_131:=IF(HJ_125<=REFX1(HJ_126,10000),HJ_128,NULL);
HJ_132:=REF(HJ_131,1)*1.0001;
短线盈损:IF( CLOSE<500,0,HJ_132),COLORDDDDDD;
HJ_133:=REFX1(MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1),30),1000);
HJ_134:=MA(CLOSE,1);
HJ_135:=SMA(SMA(HJ_134,2,1),2,1);
HJ_136:=MA(HJ_135,3);
HJ_137:=IF(CROSS(HJ_89,0.5),1,IF(CROSS(HJ_90,0.5),(-1),0));
HJ_138:=IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135>HJ_136,1,IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135<=HJ_136,(-1),HJ_137));
HJ_139:=REF(HJ_138,BARSLAST(HJ_138));
HJ_140:=ZIGZAG(C,HJ_3,1);
HJ_141:=PEAK(C,HJ_3,1,1);
HJ_142:=TROUGH(C,HJ_3,1,1);
HJ_143:=HJ_140>REF(HJ_140,1);
HJ_144:=HJ_140<=REF(HJ_140,1);
HJ_145:=IF(HJ_4=1,0,REF(HJ_139=1,1));
HJ_146:=IF(HJ_5=1,0,REF(HJ_139=(-1),1));
HJ_147:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
HJ_148:=IF(HJ_147,HJ_145,IF(PERIOD>=5,HJ_143,HJ_145));
HJ_149:=IF(HJ_147,HJ_146,IF(PERIOD>=5,HJ_144,HJ_146));
HJ_150:=IF(CROSS(HJ_148=1,0.5)||CROSS(HJ_149=1,0.5),1,0);
HJ_151:=HJ_150=1;
HJ_152:=IF(HJ_151,LLV(LOW,2),0);
HJ_153:=IF(HJ_152=0,REF(HJ_152,BARSLAST(HJ_151)),HJ_152);
IF(HJ_153=REF(HJ_153,1),HJ_153,NULL),COLOR00CCCC;
HJ_154:=HJ_150=2;
HJ_155:=IF(HJ_154,HHV(HIGH,2),0);
HJ_156:=IF(HJ_155=0,REF(HJ_155,BARSLAST(HJ_154)),HJ_155);
IF(HJ_156=REF(HJ_156,1),HJ_156,NULL),COLORCCCC00;
HJ_157:=BARSLAST(HJ_150=1);
止损位:MIN(REF(CLOSE,HJ_157),REF(CLOSE,HJ_157+1)),NODRAW,COLOR00CCCC;
HJ_158:=BARSLAST(HJ_150=2);
止盈位:MAX(REF(CLOSE,HJ_158),REF(CLOSE,HJ_158+1)),NODRAW,COLORCCCC00;
IF(止盈位=REF(止盈位,1),止盈位,NULL),DOT,COLORCCCC00;
IF(止损位=REF(止损位,1),止损位,NULL),DOT,COLOR00CCCC;
STICKLINE1(HJ_148,HIGH,LOW,1,0),COLORGREEN;
STICKLINE1(HJ_148 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORGREEN;
STICKLINE1(HJ_148 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORGREEN;
STICKLINE1(HJ_149,HIGH,LOW,0,0),COLORRED;
STICKLINE1(HJ_149 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORRED;
STICKLINE1(HJ_149 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORRED;
HJ_159:=IF((CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=10-0.01*100/REF(OPEN,1),1,0);
STICKLINE(HJ_159,OPEN,CLOSE,0,0),COLORYELLOW;
HJ_160:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(HJ_160<(-9.9),OPEN,CLOSE,0.3,0),COLORBLUE;
HJ_161:=REF(HIGH,HJ_1)=HHV(HIGH,2*HJ_1+1);
HJ_162:=BACKSET(HJ_161,HJ_1+1);
HJ_163:=FILTER(HJ_162,HJ_1) AND HIGH=HHV(HIGH,HJ_1+1);
HJ_164:=IF(HJ_4=1,0,BARSLAST(HJ_163));
HJ_165:=IF(HJ_163,CURRBARSCOUNT,0);
HJ_166:=IF(HJ_164,REF(HIGH,HJ_164),HIGH);
HJ_167:=IF(HJ_164,REF(HJ_165,HJ_164),HJ_165);
HJ_168:=REF(HJ_166,HJ_164+1);
HJ_169:=REFX1(HJ_167,10000);
HJ_170:=REF(HJ_167,HJ_164+1);
HJ_171:=REFX1(HJ_170,10000);
HJ_172:=REF(HJ_168,HJ_164+1);
HJ_173:=IF(CURRBARSCOUNT>HJ_171,0,1);
DRAWLINE1(CURRBARSCOUNT=HJ_171,HIGH,CURRBARSCOUNT=HJ_169,HIGH,1);
HJ_174:=TRENDLINES(CURRBARSCOUNT=HJ_171,HIGH,CURRBARSCOUNT=HJ_169,HIGH);
压力线:IF(HJ_174>REF(HJ_174,1),NULL,HJ_174),COLOR999900,LINETHICK3;
HJ_175:=REF(LOW,HJ_2)=LLV(LOW,2*HJ_2+1);
HJ_176:=BACKSET(HJ_175,HJ_2+1);
HJ_177:=FILTER(HJ_176,HJ_2) AND LOW=LLV(LOW,HJ_2+1);
HJ_178:=IF(HJ_5=1,0,BARSLAST(HJ_177));
HJ_179:=IF(HJ_177,CURRBARSCOUNT,0);
HJ_180:=IF(HJ_178,REF(LOW,HJ_178),LOW);
HJ_181:=IF(HJ_178,REF(HJ_179,HJ_178),HJ_179);
HJ_182:=REFX1(HJ_181,10000);
HJ_183:=REF(HJ_180,HJ_178+1);
HJ_184:=REF(HJ_181,HJ_178+1);
HJ_185:=REFX1(HJ_184,10000);
DRAWLINE1(CURRBARSCOUNT=HJ_185,LOW,CURRBARSCOUNT=HJ_182,LOW,1);
HJ_186:=TRENDLINES(CURRBARSCOUNT=HJ_185,LOW,CURRBARSCOUNT=HJ_182,LOW);
支撑线:IF(HJ_186<REF(HJ_186,1),NULL,HJ_186),COLOR990099,LINETHICK3;
HJ_187:=BACKSET(BARSTATUS=2,BARSLAST(HJ_163)+1);
HJ_188:=HJ_187>REF(HJ_187,1);
HJ_189:=BACKSET(BARSTATUS=2,BARSLAST(HJ_177)+1);
HJ_190:=HJ_189>REF(HJ_189,1);
HJ_191:=BACKSET(HJ_188,REF(BARSLAST(HJ_163),1)+2);
HJ_192:=HJ_191>REF(HJ_191,1);
HJ_193:=BACKSET(HJ_190,REF(BARSLAST(HJ_177),1)+2);
HJ_194:=HJ_193>REF(HJ_193,1);
HJ_195:=BARSLAST(HJ_190)+1;
HJ_196:=BARSLAST(HJ_194)+1;
HJ_197:=IF(HJ_195=NULL AND HJ_196>0 AND HJ_163 AND HJ_4<>1,HIGH,NULL);
HJ_198:=BARSLAST(HJ_188)+1;
HJ_199:=BARSLAST(HJ_192)+1;
HJ_200:=IF(HJ_198=NULL AND HJ_199>0 AND HJ_177 AND HJ_5<>1,LOW,NULL);
HJ_201:=REFX1(HHV(HJ_197-支撑线,0),10000);
HJ_202:=REFX1(HHV(压力线-HJ_200,0),10000);
DRAWLINE1(CURRBARSCOUNT=HJ_185,LOW+HJ_201,CURRBARSCOUNT=HJ_182,LOW+HJ_201,1),COLOR990099,LINETHICK2;
支撑通道:=TRENDLINES(CURRBARSCOUNT=HJ_185,LOW+HJ_201,CURRBARSCOUNT=HJ_182,LOW+HJ_201);
DRAWLINE1(CURRBARSCOUNT=HJ_171,HIGH-HJ_202,CURRBARSCOUNT=HJ_169,HIGH-HJ_202,1),COLOR999900,LINETHICK2;
压力通道:TRENDLINES(CURRBARSCOUNT=HJ_171,HIGH-HJ_202,CURRBARSCOUNT=HJ_169,HIGH-HJ_202);
DRAWNUMBER(HJ_150=1,止损位,止损位,2,COLOR00CCCC);
DRAWNUMBER(HJ_150=2,止盈位,止盈位,2,COLORCCCC00);
IF(CAPITAL>0 AND CLOSE<500,0,HJ_132),COLORDDDDDD;
COST(50),COLOR0000CC,LINETHICK2;
IF(平均成本<MA(平均成本,2),平均成本,NULL),COLOR00CC00,LINETHICK2;
COST(80)*0.9998,COLORWHITE;
DRAWNUMBER(ISLASTBAR,短线盈损,短线盈损,2,COLOR00DDDD);
DRAWNUMBER(ISLASTBAR,生命线,生命线,2,COLOR00DDDD);
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 股票指标不适用期货,函数系统也不同。HJ_1:=7;
HJ_2:=7;
HJ_3:=10;
//DRAWGBK(CLOSE>0,RGB(1,1,1),RGB(1,1,1),0,0,1);
CURRBARSCOUNT1:=DATACOUNT-BARPOS+1,NODRAW;
平均成本:=COST(50),COLORRED;
HJ_4:=0;
HJ_5:=0;
HJ_6:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJ_7:=IF(CLOSE<500 ,0,(20*HJ_6+19*REF(HJ_6,1)+18*REF(HJ_6,2)+17*REF(HJ_6,3)+16*REF(HJ_6,4)+15*REF(HJ_6,5)+14*REF(HJ_6,6)+13*REF(HJ_6,7)+12*REF(HJ_6,8)+11*REF(HJ_6,9)+10*REF(HJ_6,10)+9*REF(HJ_6,11)+8*REF(HJ_6,12)+7*REF(HJ_6,13)+6*REF(HJ_6,14)+5*REF(HJ_6,15)+4*REF(HJ_6,16)+3*REF(HJ_6,17)+2*REF(HJ_6,18)+REF(HJ_6,20))/210);
HJ_8:=IF(CLOSE<500 ,0,MA(HJ_7,5));
主力成本:IF(CLOSE<500 ,0,(HJ_7+HJ_8)/2),COLOR0000CC;
//DRAWBAND(HJ_7,RGB(99,0,0),HJ_8,RGB(0,99,0));
FILLRGN(HJ_7>HJ_8,HJ_7,HJ_8),COLOR00005A;
FILLRGN(HJ_7<HJ_8,HJ_7,HJ_8),COLOR006300;
生命线:COST(80)*0.9998,COLORWHITE;
HJ_9:=LOW>REF(HIGH,1)+0.001;
HJ_10:=BARSLAST(HJ_9);
HJ_11:=COUNT(LOW>REF(HIGH,HJ_10+1),HJ_10+1)=HJ_10+1;
HJ_12:=CROSS(BACKSET(HJ_11>0 AND ISLASTBAR,HJ_10+1),0.5);
HJ_13:=BARSLAST(HJ_12);
HJ_14:=IF(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),REFX(LLV(LOW,HJ_13+1),DATACOUNT-BARPOS),DRAWNULL);
HJ_15:=IF(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),REF(HIGH,HJ_13+1),DRAWNULL);
STICKLINE(CURRBARSCOUNT1<=REFX(HJ_13+1,DATACOUNT-BARPOS),HJ_14,HJ_15,15,0),COLORGRAY;
HJ_16:=HIGH<REF(LOW,1)-0.001;
HJ_17:=BARSLAST(HJ_16);
HJ_18:=COUNT(HIGH<REF(LOW,HJ_17+1),HJ_17+1)=HJ_17+1;
HJ_19:=CROSS(BACKSET(HJ_18>0 AND ISLASTBAR,HJ_17+1),0.5);
HJ_20:=BARSLAST(HJ_19);
HJ_21:=IF(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),REFX(HHV(HIGH,HJ_20+1),DATACOUNT-BARPOS),DRAWNULL);
HJ_22:=IF(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),REF(LOW,HJ_20+1),DRAWNULL);
STICKLINE(CURRBARSCOUNT1<=REFX(HJ_20+1,DATACOUNT-BARPOS),HJ_21,HJ_22,15,0),COLORGRAY;
HJ_23:=COST(1);
HJ_24:=COST(10);
HJ_25:=COST(20);
HJ_26:=COST(30);
HJ_27:=COST(40);
HJ_28:=COST(50);
HJ_29:=COST(60);
HJ_30:=COST(70);
HJ_31:=COST(80);
HJ_32:=COST(90);
HJ_33:=COST(99);
HJ_34:=COST(5);
HJ_35:=COST(15);
HJ_36:=COST(25);
HJ_37:=COST(35);
HJ_38:=COST(45);
HJ_39:=COST(55);
HJ_40:=COST(65);
HJ_41:=COST(75);
HJ_42:=COST(85);
HJ_43:=COST(95);
HJ_44:=HJ_34-HJ_23;
HJ_45:=HJ_24-HJ_34;
HJ_46:=HJ_35-HJ_24;
HJ_47:=HJ_25-HJ_35;
HJ_48:=HJ_36-HJ_25;
HJ_49:=HJ_26-HJ_36;
HJ_50:=HJ_37-HJ_26;
HJ_51:=HJ_27-HJ_37;
HJ_52:=HJ_38-HJ_27;
HJ_53:=HJ_28-HJ_38;
HJ_54:=HJ_39-HJ_28;
HJ_55:=HJ_29-HJ_39;
HJ_56:=HJ_40-HJ_29;
HJ_57:=HJ_30-HJ_40;
HJ_58:=HJ_41-HJ_30;
HJ_59:=HJ_31-HJ_41;
HJ_60:=HJ_42-HJ_31;
HJ_61:=HJ_32-HJ_42;
HJ_62:=HJ_43-HJ_32;
HJ_63:=HJ_33-HJ_43;
HJ_64:=MIN(HJ_44,MIN(HJ_45,MIN(HJ_46,MIN(HJ_47,MIN(HJ_48,MIN(HJ_49,MIN(HJ_50,MIN(HJ_51,MIN(HJ_52,MIN(HJ_53,MIN(HJ_54,MIN(HJ_55,MIN(HJ_56,MIN(HJ_57,MIN(HJ_58,MIN(HJ_59,MIN(HJ_60,MIN(HJ_61,MIN(HJ_62,HJ_63)))))))))))))))))));
HJ_65:=IF(HJ_5=1,0,HJ_64);
STICKLINE(HJ_65=HJ_44,HJ_23,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_45,HJ_24,HJ_34,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_46,HJ_35,HJ_24,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_47,HJ_25,HJ_35,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_48,HJ_36,HJ_25,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_49,HJ_26,HJ_36,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_50,HJ_37,HJ_26,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_51,HJ_27,HJ_37,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_52,HJ_38,HJ_27,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_53,HJ_28,HJ_38,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_54,HJ_39,HJ_28,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_55,HJ_29,HJ_39,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_56,HJ_40,HJ_29,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_57,HJ_30,HJ_40,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_58,HJ_41,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_59,HJ_31,HJ_41,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_60,HJ_42,HJ_30,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_61,HJ_32,HJ_42,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_62,HJ_43,HJ_32,5,0),COLORFF8800;
STICKLINE(HJ_65=HJ_63,HJ_33,HJ_43,5,0),COLORFF8800;
HJ_66:=IF(HJ_4=1,0,HJ_33-HJ_23);
HJ_67:=HJ_32-HJ_29;
HJ_68:=HJ_31-HJ_28;
HJ_69:=HJ_30-HJ_27;
HJ_70:=HJ_29-HJ_26;
HJ_71:=HJ_28-HJ_25;
HJ_72:=HJ_27-HJ_24;
HJ_73:=HJ_26-HJ_23;
STICKLINE(HJ_67/HJ_66<0.08,HJ_32,HJ_29,5,0),COLOR004455;
STICKLINE(HJ_68/HJ_66<0.08,HJ_31,HJ_28,5,0),COLOR004455;
STICKLINE(HJ_69/HJ_66<0.08,HJ_30,HJ_27,5,0),COLOR004455;
STICKLINE(HJ_70/HJ_66<0.08,HJ_29,HJ_26,5,0),COLOR004455;
STICKLINE(HJ_71/HJ_66<0.08,HJ_28,HJ_25,5,0),COLOR004455;
STICKLINE(HJ_72/HJ_66<0.08,HJ_27,HJ_24,5,0),COLOR004455;
HJ_74:=HJ_32-HJ_30;
HJ_75:=HJ_31-HJ_29;
HJ_76:=HJ_30-HJ_28;
HJ_77:=HJ_29-HJ_27;
HJ_78:=HJ_28-HJ_26;
HJ_79:=HJ_27-HJ_25;
HJ_80:=HJ_26-HJ_24;
STICKLINE(HJ_74/HJ_66<0.05,HJ_32,HJ_30,5,0),COLOR554400;
STICKLINE(HJ_75/HJ_66<0.05,HJ_31,HJ_29,5,0),COLOR554400;
STICKLINE(HJ_76/HJ_66<0.05,HJ_30,HJ_28,5,0),COLOR554400;
STICKLINE(HJ_77/HJ_66<0.05,HJ_29,HJ_27,5,0),COLOR554400;
STICKLINE(HJ_78/HJ_66<0.05,HJ_28,HJ_26,5,0),COLOR554400;
STICKLINE(HJ_79/HJ_66<0.05,HJ_27,HJ_25,5,0),COLOR554400;
STICKLINE(HJ_80/HJ_66<0.05,HJ_26,HJ_24,5,0),COLOR554400;
HJ_81:=MA(CLOSE,20);
HJ_82:=BARSLAST(CLOSE<HJ_81);
HJ_83:=BACKSET((HJ_82>=4)*HJ_82,HJ_82);
HJ_84:=BARSLAST(CLOSE>HJ_81);
HJ_85:=BACKSET((HJ_84>=4)*HJ_84,HJ_84);
HJ_86:=BARSLAST(NOT(HJ_83 OR HJ_85));
HJ_87:=BARSLAST(REF(HJ_83>0,HJ_86));
HJ_88:=BARSLAST(REF(HJ_85>0,HJ_86));
HJ_89:=IF(HJ_4=1,0,(LLV(LOW,HJ_87)=LOW));
HJ_90:=IF(HJ_5=1,0,(HHV(HIGH,HJ_88)=HIGH));
HJ_91:=IF(HJ_4=1,0,REF(HIGH,BARSLAST(HJ_90)));
HJ_92:=IF(HJ_5=1,0,REF(LOW,BARSLAST(HJ_89)));
HJ_93:=BARSLAST(HJ_87=1);
HJ_94:=REF(HJ_91,BARSLAST(HJ_87));
HJ_95:=REF(HJ_92,HJ_93);
HJ_96:=(HJ_94-HJ_95)*0.191+HJ_95;
HJ_97:=(HJ_94-HJ_95)*0.382+HJ_95;
HJ_98:=(HJ_94-HJ_95)*0.5+HJ_95;
HJ_99:=(HJ_94-HJ_95)*0.618+HJ_95;
HJ_100:=(HJ_94-HJ_95)*0.809+HJ_95;
HJ_101:=HJ_94+(HJ_94-HJ_95)*0.191;
HJ_102:=HJ_95-(HJ_94-HJ_95)*0.191;
HJ_103:=REFX(HJ_95,DATACOUNT-BARPOS);
HJ_104:=REFX(HJ_97,DATACOUNT-BARPOS);
HJ_105:=REFX(HJ_99,DATACOUNT-BARPOS);
HJ_106:=REFX(HJ_94,DATACOUNT-BARPOS);
HJ_107:=REFX(HJ_101,DATACOUNT-BARPOS);
HJ_108:=REFX(HJ_102,DATACOUNT-BARPOS);
//DRAWBAND(HJ_103,RGB(68,68,0),HJ_108,RGB(68,68,0));
FILLRGN(HJ_103>HJ_108,HJ_103,HJ_108),COLOR004444;
FILLRGN(HJ_103<HJ_108,HJ_103,HJ_108),COLOR004444;
//DRAWBAND(HJ_107,RGB(78,78,0),HJ_106,RGB(78,78,0));
FILLRGN(HJ_107>HJ_106,HJ_107,HJ_106),COLOR004E4E;
FILLRGN(HJ_107<HJ_106,HJ_107,HJ_106),COLOR004E4E;
HJ_109:=IF(DATAPERIOD=7,7,IF(DATAPERIOD=6,14,30));
HJ_110:=IF(DATAPERIOD=7,8,IF(DATAPERIOD=6,16,35));
HJ_111:=IF(DATAPERIOD=7,9,IF(DATAPERIOD=6,18,40));
HJ_112:=IF(DATAPERIOD=7,10,IF(DATAPERIOD=6,20,45));
HJ_113:=IF(DATAPERIOD=7,11,IF(DATAPERIOD=6,22,50));
HJ_114:=IF(DATAPERIOD=7,12,IF(DATAPERIOD=6,24,55));
HJ_115:=EMA(CLOSE,HJ_109);
HJ_116:=EMA(CLOSE,HJ_110);
HJ_117:=EMA(CLOSE,HJ_111);
HJ_118:=EMA(CLOSE,HJ_112);
HJ_119:=EMA(CLOSE,HJ_113);
HJ_120:=EMA(CLOSE,HJ_114);
HJ_121:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
NOTEXTM1:IF(CLOSE>0 AND HJ_121,HJ_115,DRAWNULL),COLOR005500;
NOTEXTM2:IF(CLOSE>0 AND HJ_121,HJ_116,DRAWNULL),COLOR007700;
NOTEXTM3:IF(CLOSE>0 AND HJ_121,HJ_117,DRAWNULL),COLOR009900;
NOTEXTM4:IF(CLOSE>0 AND HJ_121,HJ_118,DRAWNULL),COLOR00BB00;
NOTEXTM5:IF(CLOSE>0 AND HJ_121,HJ_119,DRAWNULL),COLOR00DD00;
NOTEXTM6:IF(CLOSE>0 AND HJ_121,HJ_120,DRAWNULL),COLORGREEN;
NOTEXTM11:IF(HJ_115>REF(HJ_115,1) AND HJ_121,HJ_115,DRAWNULL),COLOR550055;
NOTEXTM22:IF(HJ_116>REF(HJ_116,1) AND HJ_121,HJ_116,DRAWNULL),COLOR770077;
NOTEXTM33:IF(HJ_117>REF(HJ_117,1) AND HJ_121,HJ_117,DRAWNULL),COLOR990099;
NOTEXTM44:IF(HJ_118>REF(HJ_118,1) AND HJ_121,HJ_118,DRAWNULL),COLORBB00BB;
NOTEXTM55:IF(HJ_119>REF(HJ_119,1) AND HJ_121,HJ_119,DRAWNULL),COLORDD00DD;
NOTEXTM66:IF(HJ_120>REF(HJ_120,1) AND HJ_121,HJ_120,DRAWNULL),COLORMAGENTA;
HJ_122:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT大盘:IF(CLOSE<500 ,(INDEXC/HJ_122+0.812*REF(INDEXC/HJ_122,1)+0.618*REF(INDEXC/HJ_122,2)+0.382*REF(INDEXC/HJ_122,3)+0.191*REF(INDEXC/HJ_122,4))/3.003,DRAWNULL),COLOR008888;
HJ_123:=EMA(INDEXC,120)/EMA(CLOSE,120);
NOTEXT行业:IF(CLOSE<500 ,(INDEXC/HJ_123+0.812*REF(INDEXC/HJ_123,1)+0.618*REF(INDEXC/HJ_123,2)+0.382*REF(INDEXC/HJ_123,3)+0.191*REF(INDEXC/HJ_123,4))/3.003,DRAWNULL),COLOR888888;
HJ_124:=(CLOSE+0.812*REF(CLOSE,1)+0.618*REF(CLOSE,2)+0.382*REF(CLOSE,3)+0.191*REF(CLOSE,4))/3.003;
STICKLINE(HJ_124>NOTEXT行业 AND HJ_124>NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLORBB00BB;
STICKLINE(HJ_124<NOTEXT行业 AND HJ_124<NOTEXT大盘,NOTEXT行业,NOTEXT大盘,0.3,(-1)),COLOR00BB00;
HJ_125:=DAY<>REF(DAY,1);
HJ_126:=BARSLAST(HJ_125)+1;
HJ_127:=VOL*(CLOSE+LOW+HIGH)/3;
HJ_128:=SUM(HJ_127,HJ_126)/SUM(VOL,HJ_126);
HJ_129:=SUM(AMOUNT,HJ_126)/SUM(VOL,HJ_126)/100;
HJ_130:=IF(CLOSE<500,HJ_129,HJ_128);
HJ_131:=IF(HJ_125<=REFX(HJ_126,DATACOUNT-BARPOS),HJ_128,DRAWNULL);
HJ_132:=REF(HJ_131,1)*1.0001;
短线盈损:IF( CLOSE<500,0,HJ_132),COLORDDDDDD;
HJ_133:=REFX(MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1),30),DATACOUNT-BARPOS);
HJ_134:=MA(CLOSE,1);
HJ_135:=SMA(SMA(HJ_134,2,1),2,1);
HJ_136:=MA(HJ_135,3);
HJ_137:=IF(CROSS(HJ_89,0.5),1,IF(CROSS(HJ_90,0.5),(-1),0));
HJ_138:=IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135>HJ_136,1,IF(BARSSINCE(CLOSE>0)<=3 AND HJ_137=0 AND HJ_135<=HJ_136,(-1),HJ_137));
HJ_139:=REF(HJ_138,BARSLAST(HJ_138));
HJ_140:=ZIG(C,HJ_3,1);
HJ_141:=PEAK(C,HJ_3,1,1);
HJ_142:=TROUGH(C,HJ_3,1,1);
HJ_143:=HJ_140>REF(HJ_140,1);
HJ_144:=HJ_140<=REF(HJ_140,1);
HJ_145:=IF(HJ_4=1,0,REF(HJ_139=1,1));
HJ_146:=IF(HJ_5=1,0,REF(HJ_139=(-1),1));
HJ_147:=IF(HJ_4=1,0,IF(CAPITAL>0 AND CLOSE<500,0,1));
HJ_148:=IF(HJ_147,HJ_145,IF(DATAPERIOD>=5,HJ_143,HJ_145));
HJ_149:=IF(HJ_147,HJ_146,IF(DATAPERIOD>=5,HJ_144,HJ_146));
HJ_150:=IF(CROSS(HJ_148=1,0.5)||CROSS(HJ_149=1,0.5),1,0);
HJ_151:=HJ_150=1;
HJ_152:=IF(HJ_151,LLV(LOW,2),0);
HJ_153:=IF(HJ_152=0,REF(HJ_152,BARSLAST(HJ_151)),HJ_152);
IF(HJ_153=REF(HJ_153,1),HJ_153,DRAWNULL),COLOR00CCCC;
HJ_154:=HJ_150=2;
HJ_155:=IF(HJ_154,HHV(HIGH,2),0);
HJ_156:=IF(HJ_155=0,REF(HJ_155,BARSLAST(HJ_154)),HJ_155);
IF(HJ_156=REF(HJ_156,1),HJ_156,DRAWNULL),COLORCCCC00;
HJ_157:=BARSLAST(HJ_150=1);
止损位:MIN(REF(CLOSE,HJ_157),REF(CLOSE,HJ_157+1)),NODRAW,COLOR00CCCC;
HJ_158:=BARSLAST(HJ_150=2);
止盈位:MAX(REF(CLOSE,HJ_158),REF(CLOSE,HJ_158+1)),NODRAW,COLORCCCC00;
IF(止盈位=REF(止盈位,1),止盈位,DRAWNULL),POINTDOT,COLORCCCC00;
IF(止损位=REF(止损位,1),止损位,DRAWNULL),POINTDOT,COLOR00CCCC;
STICKLINE(HJ_148,HIGH,LOW,1,0),COLORGREEN;
STICKLINE(HJ_148 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORGREEN;
STICKLINE(HJ_148 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORGREEN;
STICKLINE(HJ_149,HIGH,LOW,0,0),COLORRED;
STICKLINE(HJ_149 AND CLOSE>OPEN,OPEN,CLOSE,3.8,1),COLORRED;
STICKLINE(HJ_149 AND CLOSE<=OPEN,OPEN,CLOSE,3.8,0),COLORRED;
HJ_159:=IF((CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=10-0.01*100/REF(OPEN,1),1,0);
STICKLINE(HJ_159,OPEN,CLOSE,0,0),COLORYELLOW;
HJ_160:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(HJ_160<(-9.9),OPEN,CLOSE,0.3,0),COLORBLUE;
HJ_161:=REF(HIGH,HJ_1)=HHV(HIGH,2*HJ_1+1);
HJ_162:=BACKSET(HJ_161,HJ_1+1);
HJ_163:=FILTER(HJ_162,HJ_1) AND HIGH=HHV(HIGH,HJ_1+1);
HJ_164:=IF(HJ_4=1,0,BARSLAST(HJ_163));
HJ_165:=IF(HJ_163,CURRBARSCOUNT1,0);
HJ_166:=IF(HJ_164,REF(HIGH,HJ_164),HIGH);
HJ_167:=IF(HJ_164,REF(HJ_165,HJ_164),HJ_165);
HJ_168:=REF(HJ_166,HJ_164+1);
HJ_169:=REFX(HJ_167,DATACOUNT-BARPOS);
HJ_170:=REF(HJ_167,HJ_164+1);
HJ_171:=REFX(HJ_170,DATACOUNT-BARPOS);
HJ_172:=REF(HJ_168,HJ_164+1);
HJ_173:=IF(CURRBARSCOUNT1>HJ_171,0,1);
DRAWLINE(CURRBARSCOUNT1=HJ_171,HIGH,CURRBARSCOUNT1=HJ_169,HIGH,0);
压力线:IF(H>REF(H,1),DRAWNULL,H),COLOR999900,LINETHICK3;
HJ_175:=REF(LOW,HJ_2)=LLV(LOW,2*HJ_2+1);
HJ_176:=BACKSET(HJ_175,HJ_2+1);
HJ_177:=FILTER(HJ_176,HJ_2) AND LOW=LLV(LOW,HJ_2+1);
HJ_178:=IF(HJ_5=1,0,BARSLAST(HJ_177));
HJ_179:=IF(HJ_177,CURRBARSCOUNT1,0);
HJ_180:=IF(HJ_178,REF(LOW,HJ_178),LOW);
HJ_181:=IF(HJ_178,REF(HJ_179,HJ_178),HJ_179);
HJ_182:=REFX(HJ_181,DATACOUNT-BARPOS);
HJ_183:=REF(HJ_180,HJ_178+1);
HJ_184:=REF(HJ_181,HJ_178+1);
HJ_185:=REFX(HJ_184,DATACOUNT-BARPOS);
DRAWLINE(CURRBARSCOUNT1=HJ_185,LOW,CURRBARSCOUNT1=HJ_182,LOW,0);
支撑线:IF(L<REF(L,1),DRAWNULL,L),COLOR990099,LINETHICK3;
HJ_187:=BACKSET(BARSTATUS=2,BARSLAST(HJ_163)+1);
HJ_188:=HJ_187>REF(HJ_187,1);
HJ_189:=BACKSET(BARSTATUS=2,BARSLAST(HJ_177)+1);
HJ_190:=HJ_189>REF(HJ_189,1);
HJ_191:=BACKSET(HJ_188,REF(BARSLAST(HJ_163),1)+2);
HJ_192:=HJ_191>REF(HJ_191,1);
HJ_193:=BACKSET(HJ_190,REF(BARSLAST(HJ_177),1)+2);
HJ_194:=HJ_193>REF(HJ_193,1);
HJ_195:=BARSLAST(HJ_190)+1;
HJ_196:=BARSLAST(HJ_194)+1;
HJ_197:=IF(HJ_195=DRAWNULL AND HJ_196>0 AND HJ_163 AND HJ_4<>1,HIGH,DRAWNULL);
HJ_198:=BARSLAST(HJ_188)+1;
HJ_199:=BARSLAST(HJ_192)+1;
HJ_200:=IF(HJ_198=DRAWNULL AND HJ_199>0 AND HJ_177 AND HJ_5<>1,LOW,DRAWNULL);
HJ_201:=REFX(HHV(HJ_197-支撑线,0),DATACOUNT-BARPOS);
HJ_202:=REFX(HHV(压力线-HJ_200,0),DATACOUNT-BARPOS);
DRAWLINE(CURRBARSCOUNT1=HJ_185,LOW+HJ_201,CURRBARSCOUNT1=HJ_182,LOW+HJ_201,1),COLOR990099,LINETHICK2;
DRAWLINE(CURRBARSCOUNT1=HJ_171,HIGH-HJ_202,CURRBARSCOUNT1=HJ_169,HIGH-HJ_202,1),COLOR999900,LINETHICK2;
DRAWNUMBER(HJ_150=1,止损位,止损位,2),COLOR00CCCC;
DRAWNUMBER(HJ_150=2,止盈位,止盈位,2),COLORCCCC00;
IF(平均成本<MA(平均成本,2),平均成本,DRAWNULL),COLOR00CC00,LINETHICK2;
DRAWNUMBER(ISLASTBAR,短线盈损,短线盈损,2),COLOR00DDDD;
DRAWNUMBER(ISLASTBAR,生命线,生命线,2),COLOR00DDDD; 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容