通达信指标公式源码波浪之字主图指标公式
艾略特波浪划线通达信指标公式源码
艾略特波浪划线主图:艾略特波浪理论的五浪划线,方便看盘和技术分析X:=5;D:=10;M5:MA(C,X);M10:MA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(CONST(M5)>CONST(M10),HHV(H,T+1),REF(HHV(H,T+1),ST));L1:=IF(CONST(M5)<CONST(M10),LLV(L,ST+1),REF(LLV(L,ST+1),T));H2:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST1-1),REF(HHV(H,T+1),ST2-1)); L3:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T1-1),REF(LLV(L,ST+1),T2-1)); TJ1:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T2) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ2:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ3:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ4:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ5:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T)+1 AND CURRBARSCOUNT<=CONST(ST)+1 AND L=CONST(L1);TJ6:=CONST(M5)>CONST(M10) AND H=CONST(H1) ANDCURRBARSCOUNT<=CONST(ST2);TJ7:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST2) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ8:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ9:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ10:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ11:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST)+1 AND CURRBARSCOUNT<=CONST(T)+1 AND H=CONST(H1);TJ12:=CONST(M5)<CONST(M10) AND L=CONST(L1)ANDCURRBARSCOUNT<=CONST(T2);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=CONST(MAX(MAX(H1,H2),H3));LL:=CONST(MIN(MIN(L1,L2),L3));Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,DOTLINE;DRAWTEXT(TJ7,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z),2)),'元')),COLORGREEN;HH1:=CONST(MAX(H1,MAX(H2,H3)));LL1:=CONST(MIN(MIN(L1,L2),L3));Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,DOTLINE;DRAWTEXT(TJ1,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z1),2)),'元')),COLORMAGENTA;近高:H1,COLORMAGENTA,NODRAW;近低:L1,COLORGREEN,NODRAW;中高:H2,COLORMAGENTA,NODRAW;中底:L2,COLORGREEN,NODRAW;远高:H3,COLORMAGENTA,NODRAW;远底:L3,COLORGREEN,NODRAW;。
波浪主图+财务副图指标通达信指标公式源码
波浪主图+财务副图指标波浪主图:K:=1;N:=3;巨浪H:DRAWLINE(H=HHV(H,270),H,L=LLV(L,270),L,0),POINTDOT,LINETHICK4,COLORMAGE NTA;巨浪L:DRAWLINE(L=LLV(L,270),L,H=HHV(H,270),H,0),POINTDOT,LINETHICK4,COLORMAGE NTA;大浪H:DRAWLINE(H=HHV(H,90),H,L=LLV(L,90),L,0),LINETHICK3,COLORRED;大浪L:DRAWLINE(L=LLV(L,90),L,H=HHV(H,90),H,0),LINETHICK3,COLORRED;中浪H:DRAWLINE(H=HHV(H,30),H,L=LLV(L,30),L,0),LINETHICK2,COLORLIBLUE;中浪L:DRAWLINE(L=LLV(L,30),L,H=HHV(H,30),H,0),LINETHICK2,COLORLIBLUE;小浪H:DRAWLINE(H=HHV(H,10),H,L=LLV(L,10),L,0),COLORWHITE;小浪L:DRAWLINE(L=LLV(L,10),L,H=HHV(H,10),H,0),DOTLINE,COLORWHITE;ZLH:=STRCAT('顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,30))),0));ZLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,30))),0));ZLTS:=STRCAT('中浪:',STRCAT(ZLH,ZLL));DLH:=STRCAT(' 顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,90))),0));DLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,90))),0));DLTS:=STRCAT('大浪:',STRCAT(DLH,DLL));LXTS:=STRCAT('浪型天数:',STRCAT(ZLTS,DLTS));DRAWTEXT_FIX(ISLASTBAR=1,0,0,0,LXTS),COLORWHITE;T:=10*3*N;A:=H=HHV(H,T) AND HHV(H,T)>REF(HHV(H,T),1);B:=L=LLV(L,T) AND LLV(L,T)<REF(LLV(L,T),1);WAVE1:=DRAWLINE(A,H,B,L,0);WAVE2:=DRAWLINE(B,L,A,H,0);ZG:=IF(WAVE1<REF(WAVE1,1) OR WAVE1=WAVE2,WAVE1,WAVE2),COLORMAGENTA; 峰:=WAVE2=WAVE1 AND A;谷:=WAVE2=WAVE1 AND B;峰峰天:=BARSLAST(峰)+1;谷谷天:=BARSLAST(谷)+1;D1:=HHV(H,T)>REF(HHV(H,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D2:=LLV(L,T)<REF(LLV(L,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D3:=IF(谷OR D2,峰峰天,IF(峰OR D1,谷谷天,DRAWNULL));D4:=IF(谷OR D2,L*0.99,IF(峰OR D1,H*1.01,DRAWNULL));DRAWNUMBER(D3>0 AND K=1,D4,SUM("HSL.HSL",D3)),COLORGREEN;财务副图:DRAWRECTREL(0,0,990,990,RGB(20,18,12));DRAWTEXT_FIX(1,0.14,0.01,1,'股东股份:'),COLORRED;品种类型:=FINANCE(3);所属板块:=HYBLOCK;上市天数:=FINANCE(42);股总市值:=ROUND(FINANCE(41)/100000000);流通市值:=ROUND(FINANCE(40)/100000000);股东人数:=FINANCE(8);人均持股:=ROUND(FINANCE(7)/FINANCE(8));DRAWTEXT_FIX(1,0.14,0.15,1,'品种类型:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.25,1,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.35,1,'上市天数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.45,1,'股总市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.55,1,'流通市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.65,1,'股东人数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.75,1,'人均持股:'),COLORYELLOW;DRAWTEXT_FIX(1,0.23,0.25,1,HYBLOCK),COLORLIGREEN;DRAWNUMBER_FIX(1,0.2,0.35,1,上市天数),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.45,1,股总市值),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.55,1,流通市值),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.65,1,股东人数),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.75,1,人均持股),COLORWHITE;DRAWTEXT_FIX(品种类型=1,0.23,0.15,1,'沪深A 股'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=2,0.23,0.15,1,' 中小板'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=3,0.23,0.15,1,' 创业板'),COLORMAGENTA; DRAWTEXT_FIX(1,0.23,0.35,1,'天'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.45,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.55,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.65,1,'人'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.75,1,'股'),COLORCYAN;DRAWTEXT_FIX(1,0.326,0.01,1,'业绩指标:'),COLORRED;净资收益率:=(FINANCE(33)/FINANCE(34)*100);销售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);净利润比率:=(FINANCE(30)/FINANCE(20)*100);主营利润率:=(FINANCE(23)/FINANCE(20)*100);优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};净利同增率:=FINANCE(43);DRAWTEXT_FIX(1,0.34,0.15,1,'净资收益率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.25,1,'销售毛利率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.35,1,'净利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.45,1,'主营利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.55,1,'优质资产率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.65,1,'现金负债比:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.75,1,'净利同增率:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.4,0.15,1,净资收益率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.25,1,销售毛利率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.35,1,净利润比率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.45,1,主营利润率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.55,1,优质资产率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.65,1,现金负债比),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.75,1,净利同增率),COLORWHITE;DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;市净率:=CONST(DYNAINFO(7) / FINANCE(34));市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));每股收益年:=CONST(FINANCE(33));每股现金流:=CONST((FINANCE(25)/FINANCE(1)));每股未分配:=CONST(FINANCE(32));每股公积金:=CONST(FINANCE(18));DRAWTEXT_FIX(1,0.51,0.15,1,'市净率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.25,1,'市销率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.35,1,'每股收益季:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.45,1,'每股收益年:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.55,1,'每股现金流:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.65,1,'每股未分配:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.75,1,'每股公积金:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.57,0.15,1,市净率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.25,1,市销率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.35,1,每股收益季),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益年),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.55,1,每股现金流),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.65,1,每股未分配),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.75,1,每股公积金),COLORWHITE;{风险系数}X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替} X3:=FINANCE(23)/FINANCE(10)*3.3;X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}X5:=FINANCE(20)/FINANCE(15)*0.999;Z值:=X1+X2+X3+X4+X5;DRAWTEXT_FIX(1,0.85,0.01,1,'财务预警:'),COLORRED;DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重警●'),COLORLIRED;DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻警○'),COLOR0099FF; DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无警◎'),COLORLIGREEN;LC:=REF(CLOSE,1);WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;获利筹码:=CONST(WINNER(C)*100);SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=(IF(SAT>1,1,SAT)*100);WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃:=(WRSI-WR10);活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));DRAWTEXT_FIX(1,0.74,0.15,1,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.35,1,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.55,1,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORYELLOW;DRAWRECTREL(970,340,580,270,RGB(150,10,250));DRAWRECTREL(970,470,580,540,RGB(150,10,250));DRAWRECTREL(970,670,580,740,RGB(150,10,250));DRAWRECTREL(970,340,580+CONST(量能饱和*(970-580)/100),270,RGB(0,100,0)); DRAWRECTREL(970,470,580+CONST(活跃度比*(970-580)/100),540,RGB(0,100,0)); DRAWRECTREL(970,670,580+CONST(获利筹码*(970-580)/100),740,RGB(0,100,0)); DRAWTEXT_FIX(1,0.96,0.01,1,'大盘趋势:'),COLORRED;DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.16,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.11,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.16,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.11,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX(1,0.87,0.85,1,''),COLORYELLOW;。
主升浪套装主图指标通达信指标公式源码
MA3:=MA(CLOSE,3);MA5:MA(CLOSE,5),COLORYELLOW;MA7:=MA(CLOSE,7);MA10:=MA(CLOSE,10);MA13:=MA(CLOSE,13);MA20:=MA(CLOSE,20);MA30:=MA(CLOSE,30);MA60:MA(CLOSE,60),COLORRED;MA120:=MA(CLOSE,120);MA250:=MA(CLOSE,250);STICKLINE(C>1.095*REF(C,1),C,O,3.6,0),COLOR007FEE;UPPER:= MA(CLOSE,26)+ 2*STD(CLOSE,26),LINETHICK1,COLORBLUE;V1:=240/FROMOPEN*DYNAINFO(8);D:=MA(C,5);A:=D>=REF(D,1) ;B1:=C>D AND (C-D)/D<=0.08;DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=(DIF-DEA)*2;MID := MA(CLOSE,26);LOWER:=MID - 2*STD(C,26);MA1:=(V,5);MA2:=(V,60);GX:=DIF>0 AND DEA>0 AND DIF>DEA AND MA5>MA13 AND MA13>MA20 ANDMA20>MA30 AND MA20>REF(MA20,1) AND MA13>REF(MA13,1) AND MA30>REF(MA30,1) AND MA5>REF(MA5,1) AND C> REF(C,1) AND VOL>REF(VOL,1) AND C>MA60 ANDC>MA120 AND C>MA250 AND C>REF(HHV(C,150),1) AND C>UPPER ANDUPPER>REF(UPPER,1) AND CROSS(CLOSE,UPPER);ENTERLONG:=DIF>0 AND DEA>0 AND DIF>DEA AND MA5>MA13 AND WINNER(C)>0.9 AND MA13>MA20 AND MA20>MA30 AND MA20>REF(MA20,1)AND MA13>REF(MA13,1) AND MA30>REF(MA30,1) AND MA5>REF(MA5,1) AND C> REF(C,1) AND VOL>REF(VOL,1) AND C>MA60 AND C>MA120 AND C>MA250 AND C>REF(HHV(C,50),1) AND C>UPPER AND UPPER>REF(UPPER,1) AND CROSS(CLOSE,UPPER) AND COUNT(C>MA(C,5),3)=3 AND LOW<MA(CLOSE,3) AND CLOSE>MA(CLOSE,5) AND MA5>MA20 AND MA5>MA60 AND MA13>MA60 AND V1>MA(V,60) AND V1>MA(V,5);ENTERLONG1:=VOL>MA1 AND VOL>MA2 AND C>MA13 AND C>MA20 AND C>MA30 AND C>MA60 AND C>MA120 AND C>MA250 AND A AND B1 AND DIF=HHV(DIF,30) AND MACD=HHV(MACD,2) AND WINNER(C)>0.9 AND MA5>MA13 AND WINNER(C)>0.9 AND MA13>MA20 AND MA20>MA30 AND MA20>REF(MA20,1) AND MA13>REF(MA13,1) AND MA30>REF(MA30,1) AND MA5>REF(MA5,1) AND C>REF(C,1)AND VOL>REF(VOL,1) AND C>REF(HHV(C,50),1) AND C>UPPER AND UPPER>REF(UPPER,1) ANDCROSS(CLOSE,UPPER);GX11:=GX OR ENTERLONG OR ENTERLONG1;DRAWICON(GX11,L*0.985,25);。
极致波浪理论主图指标通达信指标公式源码
极致波浪理论主图指标通达信指标公式源码一个波浪理论,手上的指标会在大家的建议之下慢慢的完善指标这东西就要一点点的精细改进,虽然不可能达到百分百的正确率但是综合几个起来看,准确率就有保障了对指标的编写一直没有放弃过,不管大盘怎么变,找到方法才能够赚钱PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3); PL10:=ZIG(3,13);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3); PL20:=ZIG(3,26);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3); PL40:=ZIG(3,55);走强一:=BARSLAST(PL5REF(PL5,1)); 走强二:=BARSLAST(PL10REF(PL10,1)); 走强三:=BARSLAST(PL20REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0); ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0); DTJZ5:=IF(PL10REF(PL20,1),COUNT(EN2,走强三),0); ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0); DTJZ10:=IF(PL20REF(PL10,1) AND ZTJD5=1,HIGH*1.02,’⑴’),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,’⑵’),COLOR0000FF; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,’⑶’),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,’⑷’),COLOR0000FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,’⑸’),COLOR0000FF; DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,’【A】’),COLOR00FF00; DRAWT EXT(EX2 AND DTJD10=2,HIGH*1.03,’【B】’),COLOR00FF00; DRAWTEXT(EN3 ANDZTJZ10=1,LOW*0.94,’【C】’),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,’①’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.94,’②’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,’③’),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.94,’④’),LINETHICK3,COLOR00FFFF; DMLJ:=HHV(HI GH,120); TY:=CLOSE;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);A:=REF(CLOSE,BARSLAST(HD)); B:=REF(CLOSE,BARSLAST(LD));T1:=BARSLAST(HD)BARSLAST(LD) AND NOT(LD); 波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2; STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2; V AR3:=LLV(HIGH,240);V AR4:=100*(CLOSE-V AR3)/V AR3;V AR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;V AR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;V AR7:=0;V AR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)),7)*100; V AR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)),13)*100; V ARA:=BARSCOUNT(CLOSE);V ARB:=V AR835; V ARC:=V ARB AND COUNT(V ARB,1)=1; V ARD:=EMA(CLOSE,21)-EMA(CLOSE,8); V ARE:=EMA(V ARD,5);V ARF:=TROUGH(3,6,1)LOW+0.04,4,0);V AR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);V AR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);V AR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);V AR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3); V AR19:=EMA(CLOSE,2)-EMA(CLOSE,150); V AR1A:=EMA(V AR19,100); V AR1B:=2*(V AR19-V AR1A);V AR1C:=POW(V AR1B,3)*0.1+POW(V AR1B,1);V AR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE)); V AR1E:=EMA(V AR1D*0.97,3); V AR1F:=(HIGH+LOW+CLOSE)/3;V AR20:=(V AR1F-MA(V AR1F,14))/(0.015*A VEDEV(V AR1F,14));V AR21:=CROSS(V AR1E,LOW); 买点一:=V AR10;买点二:=(V AR11+V AR13+V AR15+V AR17); 卖点一:=(V AR12+V AR14+V AR16+V AR18);V AR22:=买点一AND V ARF AND V ARC AND V AR21 AND V AR40,LOW-0.01,’▲买!’),COLORRED;DRAWTEXT(买点二>0,LOW-0.01,’▲买入待涨’),COLORYELLOW; DRAWTEXT(卖点一>0,HIGH+0.1,’▼快卖欲跌’), COLORWHITE; A1:=BARSCOUNT(CLOSE); AH:=HHV(HIGH,72); AL:=LLV(LOW,72); A0:=(AH-AL)/21; B1:=LOW-A0;DRAWTEXT((A1+0)/15=FLOOR((A1+0)/15),B1-2.5*A0,’▲时窗’),COLORWHITE; V AR51:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1) AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);STICKLINE(V AR51=2,LOW*0.95,LOW*0.98,8,0),COLOR0000FF;DRAWTEXT(V AR51=2,LOW*0.95,’3天’),COLORWHI TE;STICKLINE(V AR51=4,HIGH*1.05,HIGH*1.02,8,0),COLOR9966FF;DRAWTEXT(V AR51=4,HIGH*1.06,’5天’),COLORWHITE; STICKLINE(V AR51=7,LOW*0.95,LOW*0.98,8,0),COLOR00FFFF;DRAWTEXT(V AR51=7,LOW*0.95,’8天’),COLORWHITE;STICKLINE(V AR51=12,HIGH*1.05,HIGH*1.02,8,0),COLORFF33FF;DRAWTEXT(V AR51=12,HIGH*1.06,’13天’),COLORWHITE;STICKLINE(V AR51=20,LOW*0.95,LOW*0.98,8,0),COLOR0066FF;DRAWTEXT(V AR51=20,LOW*0.95,’21天’),COLORWHITE;STICKLINE(V AR51=33,HIGH*1.05,HIGH*1.02,8,0),COLORFFFF00;DRAWTEXT(V AR51=33,HIGH*1.06,’34天’),COLORWHITE; STICKLINE(V AR51=54,LOW*0.95,LOW*0.98,8,0),COLORWHITE;DRAWTEXT(V AR51=54,LOW*0.95,’55天’),COLORWHITE; STICKLINE(V AR51=88,HIGH*1.05,HIGH*1.02,8,0),COLOR00FF00;DRAWTEXT(V AR51=88,HIGH*1.06,’89天’),COLORWHITE; STICKLINE(V AR51=143,LOW*0.95,LOW*0.98,8,0),COLORCCFFFF;DRAWTEXT(V AR51=143,LOW*0.95,’144天’),COLORWHITE; STICKLINE(V AR51=232 ,HIGH*1.05,HIGH*1.02,8,0),COLORFF0033; DRAWTEXT(V AR51=232,HIGH*1.06,’233天’),COLORWHITE; STICKLINE(V AR51=376,LOW*0.95,LOW*0.98,8,0),COLORFF9966;DRAWTEXT(V AR51=376,LOW*0.95,’377天’),COLORWHITE; 立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2); 雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2); 惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2); 春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2); 清明:=FILTER(MONTH=4 AND (DAY=3 OR DAY=6 ),2); 谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2); 立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2); 小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2); 芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2); 夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2); 小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2); 大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2); 立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2); 处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2); 白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2); 秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2); 寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2); 霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2); 立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2); 小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2); 大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2); 冬至:=FILTER(MONTH=12AND (DAY=21 OR DAY=23),2); 小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2); 大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=21),2); DRAWTEXT(立春,HIGH*1.02,’立春’); DRAWTEXT(雨水,HIGH*1.02,’雨水’);DRAWTEXT(惊蛰,HIGH*1.02,’惊蛰’); DRAWTEXT(春分,HIGH*1.02,’春分’); DRAWTEXT_FIX(1,0.00,0.00,0,’送’),COLORYELLOW;。
通达信指标公式源码 低进高出 波段指标 主图源码
{低进高出(主图)}A1 : (EMA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/3,colorwhite; a2 : (EMA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/3,coloryellow; A3 : (EMA(CLOSE,9)+MA(CLOSE,18)+MA(CLOSE,36))/3,colorff00ff; Var2:=1/WINNER(CLOSE);Var3:MA(CLOSE,13);Var4:=100-ABS((CLOSE-Var3)/Var3*100);Var5:=LLV(LOW,75);Var6:=HHV(HIGH,75);Var7:=(Var6-Var5)/100;Var8:=SMA((CLOSE-Var5)/Var7,20,1);Var9:=SMA((OPEN-Var5)/Var7,20,1);VarA:=3*Var8-2*SMA(Var8,15,1);VarB:=3*Var9-2*SMA(Var9,15,1);VarC:=100-VarB;看(我)实力:=(100-VarA);散户:=MA(WINNER(CLOSE*0.95)*100,3);新庄:=(100-IF(Var2>5,IF(Var2<100,Var2,Var4-10),0));VarD:=散户>Var4;VarE:=REF(LOW,1)*0.9;VarF:=LOW*0.9;Var10:=(VarF*VOL+VarE*(CAPITAL-VOL))/CAPITAL;Var11:=EMA(Var10,30);Var12:=CLOSE-REF(CLOSE,1);Var13:=MAX(Var12,0);Var14:=ABS(Var12);Var15:=SMA(Var13,7,1)/SMA(Var14,7,1)*100;Var16:=SMA(Var13,13,1)/SMA(Var14,13,1)*100;Var17:=BARSCOUNT(CLOSE);Var18:=SMA(MAX(Var12,0),6,1)/SMA(ABS(Var12),6,1)*100;Var19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; Var1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;Var1B:=SMA((SMA(Var1A,4,1)-50)*2,3,1);Var1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; Var1D:=SMA(Var1C,4,1);Var1E:=SMA(Var1D,3,1);Var1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;Var20:=Var18<=25 AND Var19<-95 AND Var1F>20 AND Var1B<-30 AND Var1E<30 AND Var11-CLOSE>=-0.25 AND Var15<22 AND Var16<28 AND Var17>50;Var21:=(HIGH+LOW+CLOSE)/3;Var22:=(Var21-MA(Var21,14))/(0.015*AVEDEV(Var21,14));Var23:=(Var21-MA(Var21,70))/(0.015*AVEDEV(Var21,70));Var24:=IF(Var22>=150 AND Var22<200 AND Var23>=150 ANDVar23<200,10,0);Var25:=IF(Var22<=-150 AND Var22>-200 AND Var23<=-150 ANDVar23>-200,-10,Var24);断子绝生:= IF(Var23>=200 AND Var22>=150,15,IF(Var23<=-200 ANDVar22<=-150,-15,Var25))+50;drawtext(Var20,c,'★'),coloryellow;DRAWTEXT(CROSS(Var20,0.5) AND COUNT(Var20=1,10)=1,c*1.01,'有钱不赚傻'), COLORYELLOW;DRAWTEXT(CROSS(VarD,0.5) AND COUNT(VarD=1,10)=1,high*1.01,'高走'),color00ff00;Var26:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;Var27:=REVERSE(Var26);Var28:=SMA(Var26,3,1);波段王:= SMA(Var28,3,1);波段鬼:= SMA(波段王,3,1);DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,low*0.97,'低进'), COLORYELLOW;DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,low*0.99,'★'), COLORYELLOW;DRAWTEXT(CROSS(波段鬼,波段王) AND 波段鬼>75,high*1.01,'高出'),color00ff00;。
波浪主图通达信指标公式源码
K:=1;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0); 高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0); AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW; DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORLIRED; DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORYELLOW; DRAWNUMBER(极点保留=1,H,局部极点);DRAWNUMBER(极点保留=-1,L,局部极点),DRAWABOVE;。
通达信指标公式源码 一个非常有用的操盘主图(操盘主图 四方力道 波段主图 先知主图)
趋势线:MA(C,30),DOTLINE COLORFF00CC;IF(趋势线>=REF(趋势线,1),趋势线,DRAWNULL),DOTLINE,COLORYELLOW;回归斜率线A:EMA(SLOPE(C,21)*20+C,42);回归斜率线B:REF(回归斜率线A,2);IF(回归斜率线A>REF(回归斜率线A,1),回归斜率线A,DRAWNULL),COLORRED; IF(回归斜率线A<REF(回归斜率线A,1),回归斜率线A,DRAWNULL),COLORGREEN;IF(回归斜率线B>REF(回归斜率线B,1),回归斜率线B,DRAWNULL),COLORRED; IF(回归斜率线B<REF(回归斜率线B,1),回归斜率线B,DRAWNULL),COLORGREEN;经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;经典K:=SMA(经典RL,3,1); 经典D:=SMA(经典K,3,1); 经典J:=3*经典K-2*经典D;MAHL1:=100*((EMA((H+L)/2,3)-LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L, 20))) /(LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20))));MAHL2:=IF(EMA(C,2)>回归斜率线A ANDMAHL1>0,EMA(C,3),LLV(EMA((H+L)/2,5),30));{A}MAHL3:=IF(EMA(C,2)>回归斜率线A ANDMAHL1>0,LLV(EMA((H+L)/2,5),30),EMA(C,5));{A}{回归斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线A,2),RGB(0,104,154));}{C>昨C红K柱+C>O红K柱C>昨C红K柱C=昨C是跟白色24线C<昨C蓝K柱+C>O红K柱C<昨C蓝K柱}{STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORRED; STICKLINE(C<O AND C>REF(C,1),C,O,3,0),COLORFFCC00;} {STICKLINE(CLOSE> REF(CLOSE,1) ANDC>O ,OPEN,CLOSE,2.1,0 ),COLOR000099;STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;} STICKLINE(CLOSE= REF(CLOSE,1) ,H,L,3,1 ),COLOR999999;STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORWHITE; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF; {STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN; STICKLINE(C<REF(C,1) AND C>O,C,O,3,0),COLORFFCC00;STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,3,0 ),COLOR990000; STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800; STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;}{经典KDJ买:IF(CROSS(经典K,经典D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;经典KDJ买:IF(CROSS(经典K,经典D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;} DRAWICON(CROSS(经典K,经典D),L*0.96,26);{高亮红}回归斜率买:IF(CROSS(EMA(C,3),回归斜率线A),(L-(H-L)/3),DRAWNULL),POINTDOT,COLOR0000FF;{高亮红}回归斜率买_:DRAWICON(CROSS(EMA(C,3),回归斜率线A),L*0.98,1),{买};回归斜率卖:IF(CROSS(回归斜率线A,EMA(C,2)),(H+(H-L)/3),DRAWNULL),POINTDOT,COLOR00CF00;{中绿} 卖:DRAWICON(CROSS(回归斜率线A,EMA(C,2)),H*1.03,2);经典KDJ卖:IF(CROSS(经典D,经典K),(H+(H-L)/2),DRAWNULL),CROSSDOT,LINETHICK3,COLOR00CF00;{中绿}; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;X2:=LLV(J,2)=LLV(J,8);{DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.99,'★买'),COLORYELLOW; }DRAWICON(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.99,23); VAR6:=REF(C,1);VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100; DRAWTEXT(CROSS(84,VAR7),H*1.01,'逃顶'),COLORYELLOW ;AA:=(REF(H,1)-MAX(REF(C,1),REF(O,1)))/(REF(H,1)-REF(L,1))>0.6 AND (MIN(O,C)-L)/(H-L)>0.6 AND VOL<REF(VOL,1);DRAWTEXT(AA,L*0.99,'揉搓'),COLORRED;C3:=REF(C,1);跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;{DRAWTEXT(跌停,H+0.1,'跌停'),COLORGREEN;}涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;{DRAWTEXT(涨停,L-0.1,'板'),COLORYELLOW;}超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);大宗进:=(超B)+(大B),NODRAW;大宗出:=(超S)+(大S),NODRAW;非大宗进:=(中B)+(小B),NODRAW;非大宗出:=(中S)+(小S),NODRAW;DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;M1:=EMA(EMA(C,21),3);M2:=EMA(EMA(C,34),3);TT2:=CROSS(C,M1)AND CROSS(C,M2);DRAWTEXT(TT2,L*0.96,'阳');四方力道{四方力道}V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);HY1:=REF(EMA(V1,3),1);实时线:MA(CLOSE,1),COLOR006400;神秘线:HY1,COLOR400080;DRAWTEXT(CROSS(CLOSE,HY1),LOW*0.95,'B'),LINETHICK2,COLORYELLOW; DRAWTEXT(CROSS(HY1,CLOSE),HIGH*1.08,'S'),LINETHICK3,COLORWHITE; APP:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));ZL:=IF((CLOSE > OPEN),(APP * (HIGH - LOW)),IF((CLOSE < OPEN),(APP * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2)));SF:=IF((CLOSE > OPEN),(0 - (APP * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (APP * (HIGH - LOW))),(0 - (VOL / 2))));库存能量:=MA((ZL + SF),2);库存平均:=MA((ZL + SF),5);DRAWTEXT(CROSS(库存能量,库存平均),L*0.97,''),COLORFF00FF,LINETHICK4;{波段主图}工作线:=MA(CLOSE,1);趋势线:MA(CLOSE,18)COLORGREEN,LINETHICK2;强势线:MA(CLOSE,3)COLORRED,LINETHICK2;TT2:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);TT1:=REF(EMA(TT2,3),1);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA144:EMA(CLOSE,144),POINTDOT,COLORWHITE;MA318:EMA(C,318);AA1:=AMOUNT/VOL;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=VOL<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;F:=100*(C-REF(C,1))/REF(C,1);P1:=IF(C<REF(O,1) AND F<0,1,0);P2:=IF(C<REF(O,2) AND F<0,1,0);TT3:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1 ;TT4:=P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0 ;Z1:=MA(C,13);ZX:=REF(Z1,13/2+1);DRAWICON(CROSS(ZX,C),H*1.01,2);DRAWTEXT(CROSS(工作线,趋势线)AND J<55,LOW,'入')COLORWHITE; DRAWTEXT(CROSS(CLOSE,TT1)AND J<55,LOW,'买'),COLORRED; DRAWTEXT(CROSS(88,RSI),HIGH * 1.02,'顶'),COLOR00FFFF; DRAWTEXT(FF1,L*0.99,'超短'),COLOR00FF00;STICKLINE(TT3,OPEN,CLOSE,3,0),COLORFF00FF;STICKLINE(TT4,OPEN,CLOSE,3,0),COLORGREEN;TT5:=5;V1:=MA(HIGH,30)*1.15;V2:=MA(HIGH,3)*1.03;V3:=MA(LOW,3)*0.97;V4:=MA(LOW,30)*0.85;GET:ZIG(3,TT5)COLORWHITE,LINETHICK3;{先知主图}VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);VAR5:=LLV(LOW,30);VAR6:=HHV(VAR4,30);VAR7:=IF(MA(CLOSE,58),1,0);VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;VAR9:=IF(VAR8>100,100,VAR8);STICKLINE(VAR9>-150,0,VAR9,0.1,0), COLORFF00FF;吸筹指标:(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100,COLOR00FF00; STICKLINE(CROSS(吸筹指标,-24),100,0,1,0), COLORFFFFFF;先知: (CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100, COLORFF00FF;放量拉升:IF(CROSS(吸筹指标,-24),1,0), COLORFFFFFF;获利:STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,60,0,1,0),COLOR0000FF; VARK1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100; VARK2:=REVERSE(VARK1);VARK3:=SMA(VARK1,3,1);波段王:SMA(VARK3,3,1), COLORRED,LINETHICK2;波段鬼:SMA(波段王,2.5,1),COLORYELLOW,LINETHICK2;趋势线:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SM A(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),C OLORFF6666,LINETHICK2;RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K1:SMA(RSV9,3,1);DK1:K1-REF(K1,1),COLORSTICK;出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);STICKLINE( CROSS(趋势线,10),0,73,3,0), COLOR3366FF;DRAWTEXT(IF(CROSS(趋势线,10),100,0),68,'底'),COLORWHITE ; DRAWTEXT(IF(CROSS(10,趋势线),1,0), 10,'钱'),COLOR33FFCC; DRAWTEXT(REF("KDJ.J",1)<0 AND "KDJ.J">0,50,'买'),COLORRED ; DRAWTEXT(CROSS(吸筹指标,-24),80,'底'),COLORWHITE ;RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);短期底部:=LLV(OPEN,30);K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=((3 * K) - (2 * D));AA10:=MA(CLOSE,10);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);VARB:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VARC:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VARD:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VARE:=(((VARB + (2 * VARC)) + (3 * VARD)) / 6);VARF:=MA(VARE,3);STICKLINE((CROSS(J,0) AND (VARF <= (0 - 7))),0,88,2,0),COLORBLUE; DRAWICON((CROSS(J,0) AND (VARF <= (0 - 7))),88,9);VARO2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100; VARO3:=SMA(SMA(VARO2,3,1),3,1);VARO4:=EMA(VARO3,5);VARO5:=LLV(LOW,26);VARO6:=HHV(HIGH,34);VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;STICKLINE(CROSS(VARO4,10) AND VARO4>10,25,0,1,0),COLORYELLOW; 建仓区: IF((VARO7<10),0,20),LINETHICK3 ,COLORRED;。
波浪操作主图公式通达信指标公式源码
通达信主图公式,公式的名称叫做”波浪操作主图“,买点、卖点都有标注,基金入场,基金清仓都有提示,根据提示来操作,当然,还要结合大盘环境,成交量等其它指标综合分析,一个指标公式做不到尽善尽美,美中不足的是,这个指标有未来函数,信号有漂移{波浪操作主图公式};波浪线:ZIG(C,13),LINETHICK1,COLORYELLOW;DRAWTEXT(CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1)) ,LOW*0.999,'↖买'),COLORYELLOW; DRAWTEXT(CROSS(REF(ZIG(3,5),1),ZIG(3,5)) ,HIGH*1.002,'↙卖'),COLORGREEN;ZJ1953:=ZIG(C,15);粉丝:=MA(ZJ1953,3);DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'↖基金入场'),COLORMAGENTA; DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'←基金清仓'),COLORFFFFFF;阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*RE F(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,1 4)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;主力成本线:EMA(X,13),COLORMAGENTA,LINETHICK0;DRAWTEXT_FIX(1,0.00,0.920,0,'操作前先来回敲敲电脑的↑↓键'),COLOR00EEFF;{加入,轨迹主图};UR:=2;{调节轨迹宽度}; LR:=4;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}LR1:=FORCAST(C,NOD+1);NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,M IN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8,NODRAW;{近点}{隐藏}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;{远点}{隐藏}EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;{隐藏}AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC1!=DRAWNULL)+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)) );{限制高}RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)) );{限制低}中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR66666 6,LINETHICK2;上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR6666 66,LINETHICK2;下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLOR6666 66,LINETHICK2;VAR1:=(C+H+O+L)/4;顶阴影线:=XMA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'↙逃'),COLORGREEN;。
通达信波浪尺主图指标公式
通达信波浪尺主图指标公式高点:=10;低点:=10;高点选择:=1;低点选择:=1;波浪尺1:=0;波浪尺2:=1;PURC:=CONST(FINDHIGH(H,0,高点*10,高点选择));PLZ:=CONST(BARSLAST(PURC=H))+1;顶X:=CONST(IF(PLZ=1,H,REF(H,PLZ-1)));QQT:=CONST(FINDLOW(L,0,低点*10,低点选择));PLL:=CONST(BARSLAST(QQT=L))+1;低X:=CONST(IF(PLL=1,L,REF(L,PLL-1)));DRAWKLINE(H,O,L,C);顶点:顶X,COLORRED;底点:低X,COLORRED;波动速率:=100*((顶X-低X)/(IF(PLL>PLZ,低X,顶X)))/(PLL-PLZ),NODRAW,COLORMAGENTA;波动幅度:=((顶X-低X)/(IF(PLL>PLZ,低X,顶X)))*100;波动价位:=(顶X-低X)*(IF(PLL>PLZ,1,-1));BPURC:=CONST(FINDHIGH(H,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BPLZ:=CONST(BARSLAST(BPURC=H))+1;BQQT:=CONST(FINDLOW(L,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BPLL:=CONST(BARSLAST(BQQT=L))+1;BLC1:=CONST(FINDHIGH(H,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BLC2:=CONST(BARSLAST(BPURC=H))+1;BLC顶X:=CONST(IF(BPLZ=1,H,REF(H,BPLZ-1)));BLC3:=CONST(FINDLOW(L,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));B6C4:=CONST(BARSLAST(BQQT=L))+1;BLC低X:=CONST(IF(BPLL=1,L,REF(L,BPLL-1)));BASE:=IF(波动速率<0,BLC顶X,BLC低X)COLORRED;BLCX:=IF(波动速率<0,-1,1);BLCZ:=(顶点-底点)*(IF(PLL>PLZ,1,-1));B618:=BASE+(BLCZ*0.618)COLORRED,DOTLINE;B382:=BASE+(BLCZ*0.382)COLORRED,DOTLINE;B05:=BASE+(BLCZ*0.5)COLORRED,DOTLINE;B809:=BASE+(BLCZ*0.809)COLORRED,DOTLINE;B191:=BASE+(BLCZ*0.191)COLORRED,DOTLINE;B100:=BASE+(BLCZ*1)COLORRED;B200:=BASE+(BLCZ*2)COLORRED;B11:=BASE+(BLCZ*1.191)COLORRED;B12:=BASE+(BLCZ*1.382)COLORRED;B13:=BASE+(BLCZ*1.5)COLORRED;B14:=BASE+(BLCZ*1.618)COLORRED;B15:=BASE+(BLCZ*1.809)COLORRED;BZ1:=BASE+(BLCZ*0.236)COLORRED;BZ2:=BASE+(BLCZ*1.236)COLORRED;BZ3:=BASE+(BLCZ*2.236)COLORRED;B11B:=BASE+(BLCZ*2.191)COLORRED;B12B:=BASE+(BLCZ*2.382)COLORRED;B13B:=BASE+(BLCZ*2.5)COLORRED;B14B:=BASE+(BLCZ*2.618)COLORRED;B15B:=BASE+(BLCZ*2.809)COLORRED;B300:=BASE+(BLCZ*3)COLORRED;XZDD:=IF(PLL>PLZ,BPLL,BPLZ);STICKLINE(CURRBARSCOUNT=XZDD ,BASE,B300,0,0),COLO RRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B05,'---------0.500')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,BASE,'---------BASE')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B618,'---------0.618')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B809,'---------0.809')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B382,'---------0.382')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B191,'---------0.191')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B100,'---------1.000')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B11,'---------1.191')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B12,'---------1.382')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B13,'---------1.500')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B14,'---------1.618')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B15,'---------1.809')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B200,'---------2.000')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B11B,'---------2.191')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B12B,'---------2.382')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B13B,'---------2.500')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B14B,'---------2.618')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B15B,'---------2.809')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,B300,'---------3.000')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,BZ1,'---------0.236')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,BZ2,'---------1.236')COLORRED;DRAWTEXT(CURRBARSCOUNT=XZDD,BZ3,'---------2.236')COLORRED;QADQ:=IF(PLL>PLZ,PLL,PLZ);QADH:=IF(PLL>PLZ,PLZ,PLL);QHL1:=IF(PLL>PLZ,L,H);QHL2:=IF(PLL>PLZ,H,L);DRAWLINE(CURRBARSCOUNT=QADQ,QHL1,CURRBARSCO UNT=QADH,QHL2,0)COLORRED;DRAWLINE(CURRBARSCOUNT=QADH,QHL2,CURRBARSCO UNT=XZDD,QHL1,0)COLORRED;。
通达信指标——波浪主图(主图)
GET:ZIG(3,5),COLORAAAAAA;PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,13);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,26);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,55);走强一:=BARSLAST(PL5走弱一:=BARSLAST(PL5>REF(PL5,1));走强二:=BARSLAST(PL10走弱二:=BARSLAST(PL10>REF(PL10,1));走强三:=BARSLAST(PL20走弱三:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0);DTJZ5:=IF(PL10DTJD5:=IF(PL10ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强三),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0);DTJZ10:=IF(PL20DTJD10:=IF(PL20DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.97,'(Ⅰ)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.03,'(Ⅱ)'),COLORFFFF00;DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.97,'(Ⅲ)'),COLORFFFF00;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'⑴'),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'⑵'),COLOR0000FF; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'⑶'),COLOR0000FF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'⑷'),COLOR0000FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸'),COLOR0000FF; DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'【A】'),COLOR00FF00;DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'【B】'),COLOR00FF00;DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'【C】'),COLOR00FF00;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'①'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'②'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'③'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'④'),LINETHICK3,COLOR00FFFF;DMLJ:=HHV(HIGH,120);TY:=H;TY1:=L;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY1,10)=LLV(TY1,2*10+1),10),10+1),10);A:=REF(H,BARSLAST(HD));B:=REF(L,BARSLAST(LD));T1:=BARSLAST(HD)T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;。
波浪与波神 主图指标通达信指标公式源码
波浪与波神主图指标源码:波浪与波神INPUT:最近天(20,1,360);当前月:=FRACPART(ROUND(当前日期/100)/100)*100;月:=MONTH;日:=DAY;VERTLINE(月=1 AND ( 日=25)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=3 AND ( 日=20)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=5 AND ( 日=12)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=6 AND (日=14 )),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=7 AND ( 日=19 )),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=8 AND ( 日=6 )),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=9 AND ( 日=18 )),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=10 AND ( 日=31)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=11 AND ( 日=28)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=12 AND ( 日=31)),COLORFFFFFF,LINEDASHDOT; VERTLINE(月=1 AND ( 日=6 OR 日=15 OR 日=21 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=2 AND ( 日=6 OR 日=15 OR 日=21 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=3 AND ( 日=6 OR 日=15 OR 日=21 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=4 AND ( 日=6 OR 日=15 OR 日=21 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=5 AND ( 日=6 OR 日=15 OR 日=21 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=6 AND ( 日=6 OR 日=21)),COLORAAAAAA,LINEDASHDOT; VERTLINE(月=7 AND ( 日=8 OR 日=15 OR 日=23)),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=8 AND ( 日=8 OR 日=15 OR 日=23)),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=9 AND ( 日=8 OR 日=15 OR 日=23)),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=10 AND ( 日=8 OR 日=15 OR 日=23 )),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=11 AND ( 日=8 OR 日=15 OR 日=23)),COLORAAAAAA,LINEDASHDOT;VERTLINE(月=12 AND ( 日=8 OR 日=15 OR 日=23 )),COLORAAAAAA,LINEDASHDOT;N:=if(sysparam(1)=datacount,最近天,datacount-sysparam(1));HH:=HHV(HIGH,N);LL:=LLV(LOW,N);VN:=N;{LAST1:=DATACOUNT;}IF VN>DATACOUNT THENVN:=DATACOUNT+1;FOR I=DATACOUNT DOWNTO DATACOUNT-VN+1 DO BEGINHH[I]:=HH[DATACOUNT];LL[I]:=LL[DATACOUNT];END;TMP:=SETLBOUND(hh,DATACOUNT-VN+1);TMP:=SETLBOUND(ll,DATACOUNT-VN+1);阶段高:HH,LINETHICK2,color0000FF;阶段低:LL,LINETHICK2,color00FF00;中线:(HH+LL)/2,linethick0;KKH:=BARSLAST(H=HH);KKL:=BARSLAST(L=LL);N低日:=STRTONUM(NUMTOSTR(REF(DATE,KKL),0)),LINETHICK;N高日:=STRTONUM(NUMTOSTR(REF(DATE,KKH),0)),LINETHICK;多空:IF(N低日>N高日,2,1),LINETHICK0;多空天:IF(N低日<N高日,kkl,kkh),LINETHICK0;DATE1:=IF(多空=1,N低日,N高日);{}hh0:=ref(h,BARSLAST(DATE1=DATE));ll0:=ref(l,BARSLAST(DATE1=DATE));H1:=STRTONUM(NUMTOSTR(Hh0,3)),POINTDOT;L1:=STRTONUM(NUMTOSTR(Ll0,3)),POINTDOT;PARTLINE(1,H1),,POINTDOT,linethick0;PARTLINE(1,L1),,POINTDOT,linethick0;LL:=H1 - L1;VERTLINE(DATE=DATE1),COLORFFAAAA,,LINETHICK2;DRAWTEXT(DATE=DATE1,SYSPARAM(4)*0.95,'起\n \n始\n \n线'),COLORFFFFFF;起始至今天:BARSLAST(DATE1=DATE),COLORFFFF00,LINETHICK0;涨幅:(C-REF(C,起始至今天))/REF(C,起始至今天)*100,COLORFFDDDD,LINETHICK0;IF 多空=1 THEN BEGIN{看多}开门线: PARTLINE(DATE>=N低日,LL*1.50801 +L1),LINETHICK1,COLOREE99FF;;PARTLINE(DATE>=N低日,LL*2.00001 + L1),COLOR9999FF,LINEDOT;多2线: PARTLINE(DATE>=N低日,LL*2.40001 + L1),COLORFFFF99,linethick1; PARTLINE(DATE>=N低日,LL*3.05001 + L1),COLOR99FF99,LINEDOT; PARTLINE(DATE>=N低日,LL*3.75001 + L1),COLORFF9999,LINEDOT;多5线: PARTLINE(DATE>=N低日,LL*4.15001 +L1),COLORMAGENTA,linethick2,LINEDOT;PARTLINE(DATE>=N低日,LL*4.80001 + L1),COLORRED,LINEDOT;多7线: PARTLINE(DATE>=N低日,LL*5.50001 + L1),COLORCYAN,linethick2; PARTLINE(DATE>=N低日,LL*6.10001 + L1),COLORGREEN,LINEDOT; PARTLINE(DATE>=N低日,LL*6.90001 + L1),LINETHICK1,COLORRED;L*1.50801,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*2.00001+0.002,NUMTOSTR(L1+L L*2.00001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*2.40001+0.002,'NO.2'+NUMTOSTR(L1+LL*2.40001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*3.05001+0.002,NUMTOSTR(L1+L L*3.05001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*3.75001+0.002,NUMTOSTR(L1+L L*3.75001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*4.15001+0.002,'NO.5'+NUMTOSTR(L1+LL*4.15001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*4.80001+0.002,NUMTOSTR(L1+L L*4.80001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*5.50001+0.002,'NO.7'+NUMTOSTR(L1+LL*5.50001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*6.10001+0.002,NUMTOSTR(L1+L L*6.10001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,L1+LL*6.90001+0.002,NUMTOSTR(L1+L L*6.90001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(DATE=DATE1,LL*1.50801 + L1+0.002,'多开门'),colorred; DRAWTEXT(DATE=DATE1,LL*6.90001 + L1+0.002,'多关门'),colorred; END;ELSE BEGIN{看空}空开门线: PARTLINE(DATE>=N高日,H1-LL*1.50801),LINETHICK1,COLOREE99FF;PARTLINE(DATE>=N高日,H1-LL*2.00001),COLOR9999FF,LINEDOT;空2线: PARTLINE(DATE>=N高日,H1-LL*2.40001),COLORFFFF99; PARTLINE(DATE>=N高日,H1-LL*3.05001),COLOR99FF99,LINEDOT; PARTLINE(DATE>=N高日,H1-LL*3.75001),COLORFF9999,LINEDOT;空5线: PARTLINE(DATE>=N高日,H1-LL*4.15001),COLORMAGENTA; PARTLINE(DATE>=N高日,H1-LL*4.80001),COLORRED,LINEDOT;空7线: PARTLINE(DATE>=N高日,H1-LL*5.50001),COLORCYAN; PARTLINE(DATE>=N高日,H1-LL*6.10001),COLORGREEN,LINEDOT;空关门线: PARTLINE(DATE>=N高日,H1-LL*6.90001),LINETHICK1,COLORRED; DRAWTEXT(DATE=DATE1,H1-LL*1.50801+0.002,'空开门'),color3333FF; DRAWTEXT(DATE=DATE1,H1-LL*6.90001+0.002,'空关门'),color3333FF; DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*1.50801+0.002,NUMTOSTR(H1-L L*1.50801,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*2.00001+0.002,NUMTOSTR(H1-L L*2.00001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*2.40001+0.002,'NO.2'+NUMTOSTR(H1-LL*2.40001,2)),COLORAAAAAA,ALIGN2;L*3.05001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*3.75001+0.002,NUMTOSTR(H1-L L*3.75001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*4.15001+0.002,'NO.5'+NUMTOSTR(H1-LL*4.15001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*4.80001+0.002,NUMTOSTR(H1-L L*4.80001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*5.50001+0.002,'NO.7'+NUMTOSTR(H1-LL*5.50001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*6.10001+0.002,NUMTOSTR(H1-L L*6.10001,2)),COLORAAAAAA,ALIGN2;DRAWTEXT(SYSPARAM(3)=BARPOS,H1-LL*6.90001+0.002,NUMTOSTR(H1-L L*6.90001,2)),COLORAAAAAA,ALIGN2;END;高年:=ref(YEAR,BARSLAST(date=N高日));高月:=ref(MONTH,BARSLAST(date=N高日));高日:=ref(DAY,BARSLAST(date=N高日));低年:=ref(YEAR,BARSLAST(date=N低日));低月:=ref(MONTH,BARSLAST(date=N低日));低日:=ref(DAY,BARSLAST(date=N低日));DRAWTEXT(SYSPARAM(2)=BARPOS,H1,'最近'+NUMTOSTR(最近天,0)+'天最高价日期:'+NUMTOSTR(高年,0)+'年'+NUMTOSTR(高月,0)+'月'+NUMTOSTR(高日,0)+'日'+'\n \n'+'最近'+NUMTOSTR(最近天,0)+'天最低价日期:'+NUMTOSTR(低年,0)+'年'+NUMTOSTR(低月,0)+'月'+NUMTOSTR(低日,0)+'日'),COLORFFAAAA,ALIGN4;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='1',c,NUMTOSTR(当前月,0)+'月转折日:6、15、21、*25\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='2',c,NUMTOSTR(当前月,0)+'月转折日:6、15、21\n \n \n \n'),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='3',c,NUMTOSTR(当前月,0)+'月转折日:6、15、*20、21\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='4',c,NUMTOSTR(当前月,0)+'月转折日:6、15、21\n \n \n \n'),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='5',c,NUMTOSTR(当前月,0)+'月转折日:6、*1 2、15、21\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='6',c,NUMTOSTR(当前月,0)+'月转折日:6、*1 4、21\n \n \n \n'),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='7',c,NUMTOSTR(当前月,0)+'月转折日:8、15、*1 9、23\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='8',c,NUMTOSTR(当前月,0)+'月转折日:*6、8、15、23\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='9',c,NUMTOSTR(当前月,0)+'月转折日:8、15、*1 8、23\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='10',c,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='11',c,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*28\n \n \n \n '),COLOR00FFFF,ALIGN5;DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='12',c,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),COLOR00FFFF,ALIGN5;{-----------------------------立体K线--------------------------------------}{-------------------------------------------------------------------------}pl5:=之字转向(3,5);en1:=之字转向(3,5)>向前引用(之字转向(3,5),1) and 向前引用(之字转向(3,5),1)<=向前引用(之字转向(3,5),2) and 向前引用(之字转向(3,5),2)<=向前引用(之字转向(3,5),3);ex1:=之字转向(3,5)<向前引用(之字转向(3,5),1) and 向前引用(之字转向(3,5),1)>=向前引用(之字转向(3,5),2) and 向前引用(之字转向(3,5),2)>=向前引用(之字转向(3,5),3);pl10:=之字转向(3,13);en2:=之字转向(3,10)>向前引用(之字转向(3,10),1) and 向前引用(之字转向(3,10),1)<=向前引用(之字转向(3,10),2) and 向前引用(之字转向(3,10),2)<=向前引用(之字转向(3,10),3);ex2:=之字转向(3,10)<向前引用(之字转向(3,10),1) and 向前引用(之字转向(3,10),1)>=向前引用(之字转向(3,10),2) and 向前引用(之字转向(3,10),2)>=向前引用(之字转向(3,10),3);pl20:=之字转向(3,26);en3:= 之字转向(3,20)>向前引用(之字转向(3,20),1) and 向前引用(之字转向(3,20),1)<=向前引用(之字转向(3,20),2) and 向前引用(之字转向(3,20),2)<=向前引用(之字转向(3,20),3);ex3:=之字转向(3,20)<向前引用(之字转向(3,20),1) and 向前引用(之字转向(3,20),1)>=向前引用(之字转向(3,20),2) and 向前引用(之字转向(3,20),2)>=向前引用(之字转向(3,20),3);pl40:=之字转向(3,55);走强1:=上一次条件成立位置(pl5<向前引用(pl5,1));走弱1:=上一次条件成立位置(pl5>向前引用(pl5,1));走强2:=上一次条件成立位置(pl10<向前引用(pl10,1));走弱2:=上一次条件成立位置(pl10>向前引用(pl10,1));走强3:=上一次条件成立位置(pl20<向前引用(pl20,1));走弱3:=上一次条件成立位置(pl20>向前引用(pl20,1));ztjz5:=条件函数(pl10>向前引用(pl10,1),统计总数(en1,走强2),0);ztjd5:=条件函数(pl10>向前引用(pl10,1),统计总数(ex1,走强2),0);dtjz5:=条件函数(pl10<向前引用(pl10,1),统计总数(en1,走弱2),0);dtjd5:=条件函数(pl10<向前引用(pl10,1),统计总数(ex1,走弱2),0);ztjz10:=条件函数(pl20>向前引用(pl20,1),统计总数(en2,走强3),0);ztjd10:=条件函数(pl20>向前引用(pl20,1),统计总数(ex2,走强3),0);dtjz10:=条件函数(pl20<向前引用(pl20,1),统计总数(en2,走弱3),0);dtjd10:=条件函数(pl20<向前引用(pl20,1),统计总数(ex2,走弱3),0);显示文字(en1 and dtjz5=1,最低价*0.98,'(Ⅰ)'),colorffff00;显示文字(ex1 and dtjd5=2,最高价*1.02,'(Ⅱ)'),colorffff00;显示文字(en2 and ztjz5=1,最低价*0.98,'(Ⅲ)'),colorffff00;显示文字(ex1 and pl10>向前引用(pl10,1) and ztjd5=1,最高价*1.02,'⑴'),colorff;显示文字(en1 and pl10>向前引用(pl10,1) and ztjz5=2,最低价*0.98,'⑵'),colorff;显示文字(ex1 and pl10>向前引用(pl10,1) and ztjz5=2,最高价*1.02,'⑶'),colorff; 显示文字(en1 and pl10>向前引用(pl10,1) and ztjz5=3,最低价*0.98,'⑷'),colorff;显示文字(ex2 and pl20>向前引用(pl20,1) and ztjd10=1,最高价*1.02,'⑸'),colorff;显示文字(en2 and dtjz10=1,最低价*0.94,'【A】'),color00ff00;显示文字(ex2 and dtjd10=2,最高价*1.03,'【B】'),color00ff00;显示文字(en3 and ztjz10=1,最低价*0.94,'【C】'),color00ff00;显示文字(ex2 and pl20>向前引用(pl20,1) and ztjd10=1,最高价*1.04,'①'),Linethick3,colorffff;显示文字(en2 and pl20>向前引用(pl20,1) and ztjz10=2,最低价*0.94,'②'),Linethick3,colorffff;显示文字(ex2 and pl20>向前引用(pl20,1) and ztjd10=2 or (ztjd10=0 orztjd10=2) and ex2,最高价*1.04,'③'),Linethick3,colorffff;显示文字(en2 and pl20>向前引用(pl20,1) and ztjz10=3,最低价*0.94,'④'),Linethick3,colorffff;DMLJ:=最高值(最高价,120);TY:=收盘价;HD:=信号过滤(向前赋值(信号过滤(向前引用(TY,10)=最高值(TY,2*10+1),10),10+1),10);LD:=信号过滤(向前赋值(信号过滤(向前引用(TY,10)=最低值(TY,2*10+1),10),10+1),10);A:=向前引用(收盘价,上一次条件成立位置(HD));B:=向前引用(收盘价,上一次条件成立位置(LD));T1:=上一次条件成立位置(HD)<上一次条件成立位置(LD) AND 求逻辑非(HD) ; T2:=上一次条件成立位置(HD)>上一次条件成立位置(LD) AND 求逻辑非(LD); 波浪顶:条件函数(T1,A,A),COLORFF00FF,点状线,LINETHICK4;画柱线(T1,A,A,9,0),COLORFF00FF;波浪底:条件函数(T2,B,B),COLOR80FF00,点状线,LINETHICK4;VAR3:=最低值(最高价,240);VAR4:=100*(收盘价-VAR3)/VAR3;VAR5:=(收盘价-最低值(最低价,528))/(最高值(最高价,528)-最低值(最低价,528))*100;VAR6:=(收盘价-最低值(收盘价,530))/(最高值(收盘价,530)-最低值(收盘价,530))*100;VAR7:=0;VAR8:=简单移动平均(最高值(收盘价-向前引用(收盘价,1),0),34)/简单移动平均(绝对值(收盘价-向前引用(收盘价,1)),7)*100;VAR9:=简单移动平均(最高值(收盘价-向前引用(收盘价,1),0),13)/简单移动平均(绝对值(收盘价-向前引用(收盘价,1)),13)*100;VARA:=有效值周期数(收盘价);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND 统计总数(VARB,1)=1;VARD:=指数平滑移动平均(收盘价,21)-指数平滑移动平均(收盘价,8); VARE:=指数平滑移动平均(VARD,5);VARF:=前M个波谷值(3,6,1)<4 AND 交叉函数(VARD,VARE);VAR10:=条件函数(前M个波谷值(3,16,1)=0 AND 最高价>最低价+0.04,4,0); VAR11:=之字转向(3,6)>向前引用(之字转向(3,6),1) AND 向前引用(之字转向(3,6),1)<=向前引用(之字转向(3,6),2) AND 向前引用(之字转向(3,6),2)<=向前引用(之字转向(3,6),3);VAR12:=之字转向(3,6)<向前引用(之字转向(3,6),1) AND 向前引用(之字转向(3,6),1)>=向前引用(之字转向(3,6),2) AND 向前引用(之字转向(3,6),2)>=向前引用(之字转向(3,6),3);VAR13:=之字转向(3,22)>向前引用(之字转向(3,22),1) AND 向前引用(之字转向(3,22),1)<=向前引用(之字转向(3,22),2) AND 向前引用(之字转向(3,22),2)<=向前引用(之字转向(3,22),3);VAR14:=之字转向(3,22)<向前引用(之字转向(3,22),1) AND 向前引用(之字转向(3,22),1)>=向前引用(之字转向(3,22),2) AND 向前引用(之字转向(3,22),2)>=向前引用(之字转向(3,22),3);VAR15:=之字转向(3,51)>向前引用(之字转向(3,51),1) AND 向前引用(之字转向(3,51),1)<=向前引用(之字转向(3,51),2) AND 向前引用(之字转向(3,51),2)<=向前引用(之字转向(3,51),3);VAR16:=之字转向(3,51)<向前引用(之字转向(3,51),1) AND 向前引用(之字转向(3,51),1)>=向前引用(之字转向(3,51),2) AND 向前引用(之字转向(3,51),2)>=向前引用(之字转向(3,51),3);VAR17:=之字转向(3,72)>向前引用(之字转向(3,72),1) AND 向前引用(之字转向(3,72),1)<=向前引用(之字转向(3,72),2) AND 向前引用(之字转向(3,72),2)<=向前引用(之字转向(3,72),3);VAR18:=之字转向(3,72)<向前引用(之字转向(3,72),1) AND 向前引用(之字转向(3,72),1)>=向前引用(之字转向(3,72),2) AND 向前引用(之字转向(3,72),2)>=向前引用(之字转向(3,72),3);VAR19:=指数平滑移动平均(收盘价,2)-指数平滑移动平均(收盘价,150);VAR1A:=指数平滑移动平均(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=乘幂(VAR1B,3)*0.1+乘幂(VAR1B,1);VAR1D:=开平方(开平方(最低价*最高价*开盘价*收盘价));VAR1E:=指数平滑移动平均(VAR1D*0.97,3);VAR1F:=(最高价+最低价+收盘价)/3;VAR20:=(VAR1F-简单移动平均(VAR1F,14))/(0.015*平均绝对偏差(VAR1F,14)); VAR21:=交叉函数(VAR1E,最低价);买点1:=VAR10;买点2:=(VAR11+VAR13+VAR15+VAR17);卖点1:=(VAR12+VAR14+VAR16+VAR18),LINETHICK2;VAR22:=买点1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110);VAR1:=简单移动平均(收盘价,6);VAR2:=简单移动平均(收盘价,18);VAR31:=简单移动平均(收盘价,30);VARB1:=求和(收盘价*成交量*100,28)/求和(成交量*100,28);VARC1:=取整(VARB1*100)/100;VARD1:=指数平滑移动平均(收盘价,5)-指数平滑移动平均(收盘价,10);VARE1:=指数平滑移动平均(VARD1,9);VAR131:=向前引用(VARE1,1);VAR141:=VARE1;VAR151:=VAR141-VAR131;VAR161:=向前引用(VARD1,1);VAR171:=VARD1;VAR181:=VAR171-VAR161;VAR191:=开盘价;VAR1A1:=收盘价;显示文字(买点1>0,最低价-0.01,'▲买!'),COLORRED;显示文字(买点2>0,最低价-0.01,'▲要涨'),COLORYELLOW;显示文字(卖点1>0,最高价+0.1,'▼快卖'), COLORWHITE;a:=有效值周期数(收盘价);ah:=最高值(最高价,72);al:=最低值(最低价,72);a0:=(ah-al)/21;b1:=最低价-a0;显示文字((a+0)/15=向下舍入((a+0)/15),b1-2.5*a0,'▲时窗'),COLORWHITE; var31:=上一高点位置(之字转向(3, 19)>向前引用(之字转向(3,19),1)and 向前引用(之字转向(3,19), 1)<向前引用(之字转向(3,19), 2),0);画柱线(var31=2,最低价*0.95,最低价*0.98,8,0),color0000ff;显示文字(var31=2,最低价*0.95,'3天'),COLORWHITE;画柱线(var31=4,最高价*1.05,最高价*1.02,8,0),color9966ff;显示文字(var31=4,最高价*1.06,'5天'),COLORWHITE;画柱线(var31=7,最低价*0.95,最低价*0.98,8,0),color00ffff;显示文字(var31=7,最低价*0.95,'8天'),COLORWHITE;画柱线(var31=12,最高价*1.05,最高价*1.02,8,0),colorff33ff;显示文字(var31=12,最高价*1.06,'13天'),COLORWHITE;画柱线(var31=20,最低价*0.95,最低价*0.98,8,0),color0066ff;显示文字(var31=20,最低价*0.95,'21天'),COLORWHITE;画柱线(var31=33,最高价*1.05,最高价*1.02,8,0),colorffff00;显示文字(var31=33,最高价*1.06,'34天'),COLORWHITE;画柱线(var31=54,最低价*0.95,最低价*0.98,8,0),COLORWHITE;显示文字(var31=54,最低价*0.95,'55天'),COLORWHITE;画柱线(var31=88,最高价*1.05,最高价*1.02,8,0),color00ff00;显示文字(var31=88,最高价*1.06,'89天'),COLORWHITE;画柱线(var31=143,最低价*0.95,最低价*0.98,8,0),colorccffff;显示文字(var31=143,最低价*0.95,'144天'),COLORWHITE;画柱线(var31=232 ,最高价*1.05,最高价*1.02,8,0),colorff0033;显示文字(var31=232,最高价*1.06,'233天'),COLORWHITE;画柱线(var31=376,最低价*0.95,最低价*0.98,8,0),colorff9966;显示文字(var31=376,最低价*0.95,'377天'),COLORWHITE;立春:=信号过滤(月份=2 AND (日期=3 OR 日期=5 ),2);雨水:=信号过滤(月份=2 AND (日期=18 OR 日期=20),2);惊蛰:=信号过滤(月份=3 AND (日期=5 OR 日期=7 ),2);春分:=信号过滤(月份=3 AND (日期=20 OR 日期=22),2);清明:=信号过滤(月份=4 AND (日期=3 OR 日期=6 ),2);谷雨:=信号过滤(月份=4 AND (日期=19 OR 日期=21),2);立夏:=信号过滤(月份=5 AND (日期=6 OR 日期=8 ),2);小满:=信号过滤(月份=5 AND (日期=20 OR 日期=22),2);芒种:=信号过滤(月份=6 AND (日期=5 OR 日期=7 ),2);夏至:=信号过滤(月份=6 AND (日期=20 OR 日期=22),2);小暑:=信号过滤(月份=7 AND (日期=6 OR 日期=8 ),2);大署:=信号过滤(月份=7 AND (日期=22 OR 日期=24),2);立秋:=信号过滤(月份=8 AND (日期=7 OR 日期=9 ),2);处暑:=信号过滤(月份=8 AND (日期=22 OR 日期=24),2);白露:=信号过滤(月份=9 AND (日期=7 OR 日期=9 ),2);秋分:=信号过滤(月份=9 AND (日期=22 OR 日期=24),2);寒露:=信号过滤(月份=10 AND (日期=7 OR 日期=9 ),2);霜降:=信号过滤(月份=10 AND (日期=22 OR 日期=24),2);立冬:=信号过滤(月份=11 AND (日期=7 OR 日期=9 ),2);小雪:=信号过滤(月份=11 AND (日期=22 OR 日期=24),2);大雪:=信号过滤(月份=12 AND (日期=6 OR 日期=8 ),2);冬至:=信号过滤(月份=12 AND (日期=21 OR 日期=23),2);小寒:=信号过滤(月份=1 AND (日期=5 OR 日期=7 ),2);大寒:=信号过滤(月份=1 AND (日期=19 OR 日期=21),2);显示文字(立春,最高价*1.02,'立春'),COLORgreen,ALIGN1;显示文字(雨水,最高价*1.02,'雨水'),COLORgreen,ALIGN1;显示文字(惊蛰,最高价*1.02,'惊蛰'),COLORgreen,ALIGN1;显示文字(春分,最高价*1.02,'春分'),COLORgreen,ALIGN1;显示文字(清明,最高价*1.02,'清明'),COLORgreen,ALIGN1;显示文字(谷雨,最高价*1.02,'谷雨'),COLORgreen,ALIGN1;显示文字(立夏,最高价*1.02,'立夏'),COLORMAGENTA,ALIGN1;显示文字(小满,最高价*1.02,'小满'),COLORMAGENTA,ALIGN1;显示文字(芒种,最高价*1.02,'芒种'),COLORMAGENTA,ALIGN1;显示文字(夏至,最高价*1.02,'夏至'),COLORMAGENTA,ALIGN1;显示文字(小暑,最高价*1.02,'小暑'),COLORMAGENTA,ALIGN1;显示文字(大署,最高价*1.02,'大署'),COLORMAGENTA,ALIGN1;显示文字(立秋,最高价*1.02,'立秋'),COLORYELLOW,ALIGN1;显示文字(处暑,最高价*1.02,'处暑'),COLORYELLOW,ALIGN1;显示文字(白露,最高价*1.02,'白露'),COLORYELLOW,ALIGN1;显示文字(秋分,最高价*1.02,'秋分'),COLORYELLOW,ALIGN1;显示文字(寒露,最高价*1.02,'寒露'),COLORYELLOW,ALIGN1;显示文字(霜降,最高价*1.02,'霜降'),COLORYELLOW,ALIGN1;显示文字(立冬,最高价*1.02,'立冬'),COLORWHITE,ALIGN1;显示文字(小雪,最高价*1.02,'小雪'),COLORWHITE,ALIGN1;显示文字(大雪,最高价*1.02,'大雪'),COLORWHITE,ALIGN1;显示文字(冬至,最高价*1.02,'冬至'),COLORWHITE,ALIGN1;显示文字(小寒,最高价*1.02,'小寒'),COLORWHITE,ALIGN1;显示文字(大寒,最高价*1.02,'大寒'),COLORWHITE,ALIGN1;GET:ZIG(3,5)COLORWHITE,LINETHICK2;{开盘既知今天高低价}高:=MA(REF(H,1)/REF(C,2),27)*REF(C,1);低:=MA(REF(L,1)/REF(C,2),27)*REF(C,1);A5:=低[SYSPARAM(1)];RA5:=低[SYSPARAM(1)-1];A10:=高[SYSPARAM(1)];RA10:=高[SYSPARAM(1)-1];jt5:=if(A5>RA5,'↑','↓');jt10:=if(A10>RA10,'↑','↓');SZ1:='开盘预测最高价:'+NUMTOSTR(高[SYSPARAM(1)],2)+jt10; DRAWTEXT(BARPOS=SYSPARAM(2),c,SZ1),align4,COLORMAGENTA;SZ:='\n \n开盘预测最低价:'+NUMTOSTR(低[SYSPARAM(1)],2)+jt5; DRAWTEXT(BARPOS=SYSPARAM(2),c,SZ),align4,COLORGREEN;。
波浪主图+财务副图指标通达信指标公式源码
波浪主图+财务副图指标波浪主图:K:=1;N:=3;巨浪H:DRAWLINE(H=HHV(H,270),H,L=LLV(L,270),L,0),POINTDOT,LINETHICK4,COLORMAGE NTA;巨浪L:DRAWLINE(L=LLV(L,270),L,H=HHV(H,270),H,0),POINTDOT,LINETHICK4,COLORMAGE NTA;大浪H:DRAWLINE(H=HHV(H,90),H,L=LLV(L,90),L,0),LINETHICK3,COLORRED;大浪L:DRAWLINE(L=LLV(L,90),L,H=HHV(H,90),H,0),LINETHICK3,COLORRED;中浪H:DRAWLINE(H=HHV(H,30),H,L=LLV(L,30),L,0),LINETHICK2,COLORLIBLUE;中浪L:DRAWLINE(L=LLV(L,30),L,H=HHV(H,30),H,0),LINETHICK2,COLORLIBLUE;小浪H:DRAWLINE(H=HHV(H,10),H,L=LLV(L,10),L,0),COLORWHITE;小浪L:DRAWLINE(L=LLV(L,10),L,H=HHV(H,10),H,0),DOTLINE,COLORWHITE;ZLH:=STRCAT('顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,30))),0));ZLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,30))),0));ZLTS:=STRCAT('中浪:',STRCAT(ZLH,ZLL));DLH:=STRCAT(' 顶天数:',CON2STR(CONST(BARSLAST(H=HHV(H,90))),0));DLL:=STRCAT('底天数:',CON2STR(CONST(BARSLAST(L=LLV(L,90))),0));DLTS:=STRCAT('大浪:',STRCAT(DLH,DLL));LXTS:=STRCAT('浪型天数:',STRCAT(ZLTS,DLTS));DRAWTEXT_FIX(ISLASTBAR=1,0,0,0,LXTS),COLORWHITE;T:=10*3*N;A:=H=HHV(H,T) AND HHV(H,T)>REF(HHV(H,T),1);B:=L=LLV(L,T) AND LLV(L,T)<REF(LLV(L,T),1);WAVE1:=DRAWLINE(A,H,B,L,0);WAVE2:=DRAWLINE(B,L,A,H,0);ZG:=IF(WAVE1<REF(WAVE1,1) OR WAVE1=WAVE2,WAVE1,WAVE2),COLORMAGENTA; 峰:=WAVE2=WAVE1 AND A;谷:=WAVE2=WAVE1 AND B;峰峰天:=BARSLAST(峰)+1;谷谷天:=BARSLAST(谷)+1;D1:=HHV(H,T)>REF(HHV(H,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D2:=LLV(L,T)<REF(LLV(L,T),1) AND ISLASTBAR AND WAVE2!=WAVE1;D3:=IF(谷OR D2,峰峰天,IF(峰OR D1,谷谷天,DRAWNULL));D4:=IF(谷OR D2,L*0.99,IF(峰OR D1,H*1.01,DRAWNULL));DRAWNUMBER(D3>0 AND K=1,D4,SUM("HSL.HSL",D3)),COLORGREEN;财务副图:DRAWRECTREL(0,0,990,990,RGB(20,18,12));DRAWTEXT_FIX(1,0.14,0.01,1,'股东股份:'),COLORRED;品种类型:=FINANCE(3);所属板块:=HYBLOCK;上市天数:=FINANCE(42);股总市值:=ROUND(FINANCE(41)/100000000);流通市值:=ROUND(FINANCE(40)/100000000);股东人数:=FINANCE(8);人均持股:=ROUND(FINANCE(7)/FINANCE(8));DRAWTEXT_FIX(1,0.14,0.15,1,'品种类型:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.25,1,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.35,1,'上市天数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.45,1,'股总市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.55,1,'流通市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.65,1,'股东人数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.75,1,'人均持股:'),COLORYELLOW;DRAWTEXT_FIX(1,0.23,0.25,1,HYBLOCK),COLORLIGREEN;DRAWNUMBER_FIX(1,0.2,0.35,1,上市天数),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.45,1,股总市值),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.55,1,流通市值),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.65,1,股东人数),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.75,1,人均持股),COLORWHITE;DRAWTEXT_FIX(品种类型=1,0.23,0.15,1,'沪深A 股'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=2,0.23,0.15,1,' 中小板'),COLORMAGENTA; DRAWTEXT_FIX(品种类型=3,0.23,0.15,1,' 创业板'),COLORMAGENTA; DRAWTEXT_FIX(1,0.23,0.35,1,'天'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.45,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.55,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.65,1,'人'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.75,1,'股'),COLORCYAN;DRAWTEXT_FIX(1,0.326,0.01,1,'业绩指标:'),COLORRED;净资收益率:=(FINANCE(33)/FINANCE(34)*100);销售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);净利润比率:=(FINANCE(30)/FINANCE(20)*100);主营利润率:=(FINANCE(23)/FINANCE(20)*100);优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};净利同增率:=FINANCE(43);DRAWTEXT_FIX(1,0.34,0.15,1,'净资收益率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.25,1,'销售毛利率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.35,1,'净利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.45,1,'主营利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.55,1,'优质资产率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.65,1,'现金负债比:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.75,1,'净利同增率:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.4,0.15,1,净资收益率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.25,1,销售毛利率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.35,1,净利润比率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.45,1,主营利润率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.55,1,优质资产率),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.65,1,现金负债比),COLORWHITE; DRAWNUMBER_FIX(1,0.4,0.75,1,净利同增率),COLORWHITE;DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;市净率:=CONST(DYNAINFO(7) / FINANCE(34));市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));每股收益年:=CONST(FINANCE(33));每股现金流:=CONST((FINANCE(25)/FINANCE(1)));每股未分配:=CONST(FINANCE(32));每股公积金:=CONST(FINANCE(18));DRAWTEXT_FIX(1,0.51,0.15,1,'市净率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.25,1,'市销率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.35,1,'每股收益季:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.45,1,'每股收益年:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.55,1,'每股现金流:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.65,1,'每股未分配:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.75,1,'每股公积金:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.57,0.15,1,市净率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.25,1,市销率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.35,1,每股收益季),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益年),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.55,1,每股现金流),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.65,1,每股未分配),COLORWHITE; DRAWNUMBER_FIX(1,0.57,0.75,1,每股公积金),COLORWHITE;{风险系数}X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替} X3:=FINANCE(23)/FINANCE(10)*3.3;X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}X5:=FINANCE(20)/FINANCE(15)*0.999;Z值:=X1+X2+X3+X4+X5;DRAWTEXT_FIX(1,0.85,0.01,1,'财务预警:'),COLORRED;DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重警●'),COLORLIRED;DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻警○'),COLOR0099FF; DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无警◎'),COLORLIGREEN;LC:=REF(CLOSE,1);WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;获利筹码:=CONST(WINNER(C)*100);SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=(IF(SAT>1,1,SAT)*100);WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃:=(WRSI-WR10);活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));DRAWTEXT_FIX(1,0.74,0.15,1,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.35,1,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.55,1,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORYELLOW;DRAWRECTREL(970,340,580,270,RGB(150,10,250));DRAWRECTREL(970,470,580,540,RGB(150,10,250));DRAWRECTREL(970,670,580,740,RGB(150,10,250));DRAWRECTREL(970,340,580+CONST(量能饱和*(970-580)/100),270,RGB(0,100,0)); DRAWRECTREL(970,470,580+CONST(活跃度比*(970-580)/100),540,RGB(0,100,0)); DRAWRECTREL(970,670,580+CONST(获利筹码*(970-580)/100),740,RGB(0,100,0)); DRAWTEXT_FIX(1,0.96,0.01,1,'大盘趋势:'),COLORRED;DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.16,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.11,1,'∧∧∧∧'),COLORRED; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.16,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.11,1,'∨∨∨∨'),COLORGREEN; DRAWTEXT_FIX(1,0.87,0.85,1,''),COLORYELLOW;。
通达信指标——波浪买卖主图(主图)
均衡:=IF (YEAR<=2017,IF(YEAR<2017, EMA(EMA(CLOSE,5),5),IF(YEAR=2017 AND MONTH<10, EMA(EMA(CLOSE,5),5),1000)),1000);中轨:=HHV(MA(HIGH,13),13);趋势:=LLV(MA(HIGH,13),1);V ARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;V ARB:=EMA(0.667*REF(V ARA,1)+0.333*VARA,5);V ARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)* 100;V AR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;V AR2:=REF(VAR1,1);V AR3:=SMA(MAX(V AR1-V AR2,0),10,1)/SMA(ABS(V AR1-V AR2),10,1)*100;V AR4:=(IF(COUNT(V AR3<20,5)>=1 AND COUNT(V AR1=LLV(V AR1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0));V AR5:=(均衡>REF(均衡,1)AND 中轨REF(CLOSE,1));趋势向上:=IF (MA(CLOSE,1)>MA(CLOSE,2) AND MA(CLOSE,2)>MA(CLOSE,3),1,0);出击A:=IF (VAR5 AND 趋势向上,100,0);均衡A:=BARSLAST(出击A>0);A:=REF(均衡A,1)>5 AND 出击A>0;CALF:=EMA((C/REF(C,10)-1)*100,5);CALF1:=EMA((C/REF(C,10)-1)*100,30);CALF2:=EMA((C/REF(C,10)-1)*100,120);CALF3:=CROSS(CALF,CALF1);B1F:=IF (YEAR>2005 AND CALF3>0,1,0);D1F:=IF(REF(CLOSE,1)C1F:=IF((CLOSE-REF(CLOSE,1))/CLOSE*100>3.6,1,0);AFF:=IF(B1F AND C1F AND D1F ,1,0);FLY1:=FORCAST(CLOSE,8);FLY2:=HHV(FL Y1,18);FLY3:=EMA(COST(5),17);FLY4:=(CLOSE+OPEN)*0.75/2;FLY5:=CROSS(FL Y3,FL Y4);CBPZ:=IF (A OR AFF OR FL Y5,1,0);CBPYY:=BARSLAST(CBPZ>0);ZJMR1:=REF(CBPYY,1)>5 AND CBPZ>0;ZJMR2:=IF (CROSS(ZIG(3,7),REF(ZIG(3,7),1)),1,0);HHH:=30;CCV AR2:=REF(LOW,1);CCV AR3:=SMA(ABS(LOW-CCV AR2),3,1)/SMA(MAX(LOW-CCVAR2,0),3,1)*100;CCV AR4:=EMA(IF(CLOSE*1.2,CCV AR3*10,CCV AR3/10),3);CCV AR5:=LLV(LOW,HHH);CCV AR6:=HHV(CCV AR4,HHH);CCV AR7:=IF(LLV(LOW,58),1,0);CCV AR8:=EMA(IF(LOW<=CCV AR5,(CCV AR4+CCV AR6*2)/2,0),3)/618*CCV AR7;DY11:=(2*CLOSE+HIGH+LOW)/4;DY12:=LLV(LOW,34);DY13:=HHV(HIGH,13);A11:=MA((DY11-DY12)/(DY13-DY12)*100,13);B11:=EMA((0.668*REF(A11,1)+0.333*A11),2);DY1:=(2*CLOSE+HIGH+LOW)/4;DY2:=LLV(LOW,34);DY3:=HHV(HIGH,13);DY A:=EMA((DY1-DY2)/(DY3-DY2)*100,30);DYB:=EMA(DYA,7);A1:=EMA((DY1-DY2)/(DY3-DY2)*100,9);B1:=EMA((0.667*REF(A1,2)+0.333*A1),2);买入:=IF(CROSS(A1,B1)AND A1<25,35,0);关注A:=IF (YEAR<=2017,IF(YEAR<2017, IF(CROSS(A11,B11)AND A11<25,40,20),IF(YEAR=2017 AND MONTH<10, IF(CROSS(A11,B11)AND A11<25,40,20),1000)),1000);CCV AR99:=IF (REF(CCV AR8,1)>1 AND CCV AR8<1, 1,0);CCCV AR99:=IF (REF(CCV AR8,1)>1 AND CCVAR8<1, 1,0);AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF(YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 AND MONTH<10,REF(AF,1),0)),0);STICKLINE(AF>BF,AF,BF,6,0),COLORYELLOW;STICKLINE(AF。
波段线主图源码通达信指标公式源码
神奇的波段指标红绿线表示多空波段包含了短期支撑压力提示BS和止损价还加入了一个单阳不破的提示会提示用到未来数据,是画线时使用的,不影响其他{波段线(通达信主图)}N:=20;N1:=7;N2:=79;MA7:MA(C,7),COLORMAGENTA,LINETHICK2;MA89:MA(C,89),COLORBLUE,LINETHICK2;VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;A1:=(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4; A2:=EMA(A1,2);A3:=EMA(A2,2);A4:=EMA(A3,2);A5:=EMA(A4,2);A6:=EMA(A5,2);A7:=EMA(A6,2);IF(A1>REF(A1,1),A1,DRAWNULL),COLORRED;IF(A1<REF(A1,1),A1,DRAWNULL),COLORGREEN;IF(A2>REF(A2,1),A2,DRAWNULL),COLORRED;IF(A2<REF(A2,1),A2,DRAWNULL),COLORGREEN;IF(A3>REF(A3,1),A3,DRAWNULL),COLORRED;IF(A3<REF(A3,1),A3,DRAWNULL),COLORGREEN;IF(A4>REF(A4,1),A4,DRAWNULL),COLORRED;IF(A4<REF(A4,1),A4,DRAWNULL),COLORGREEN;IF(A5>REF(A5,1),A5,DRAWNULL),COLORRED;IF(A5<REF(A5,1),A5,DRAWNULL),COLORGREEN;IF(A6>REF(A6,1),A6,DRAWNULL),COLORRED;IF(A6<REF(A6,1),A6,DRAWNULL),COLORGREEN;IF(A7>REF(A7,1),A7,DRAWNULL),COLORRED;IF(A7<REF(A7,1),A7,DRAWNULL),COLORGREEN;压力:HHV(MA((L+H+C)/3,5),60),COLORCYAN,LINETHICK2;JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);DRAWICON(REF(A<B,1) AND A>B,L*0.98,1);{DRAWTEXT(REF(A<B,1) AND A>B,L,'--------------B'), COLORYELLOW;}M3:=EMA(CLOSE,3);M8:=EMA(CLOSE,8);M13:=EMA(M8,13);M55:=EMA(M8,55);VAR1B:=EMA(M13,55);M81:=EMA(M55,81);M6:=EMA(VAR1B,144), COLORRED,LINETHICK2;VAR2B:=(REF(HIGH,1)+REF(LOW,1))/2;VAR3B:=MA(CLOSE,N)+2*STD(CLOSE,N);DRAWICON(CROSS(VAR2B,VAR3B),HIGH+0.1,2);VAR4B:=REF(CLOSE,1);VAR5B:=SMA(MAX(CLOSE-VAR4B,0),N1,1)/SMA(ABS(CLOSE-VAR4B),N1,1)*100; VAR6B:=CROSS(N2,VAR5B);VAR7B:=FILTER(VAR6B,4);DRAWICON(VAR7B,HIGH+0.1,2);ZTJZ:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(ZTJZ AND COUNT(ZTJZ,13)>=1,C,O,1,0),COLORYELLOW; DRAWTEXT(ZTJZ AND COUNT(ZTJZ,13)>=1,H*1.015,''),COLORYELLOW,LINETHICK1; DRAWTEXT(ZTJZ AND COUNT(ZTJZ,13)>=1,H*1.028,''),COLORYELLOW;YZFZ:=4;YBLZ:=1.90;DYKX:=C>O*(1+YZFZ/100) AND VOL>REF(VOL,1)*YBLZ;LS0:=BARSLAST(DYKX);BPJZ:=REF(L,LS0);DRAWTEXT(DYKX,L-L*0.02,'阳'),COLOR00FFFF;WZX1:=BPJZ *0.998;WZX2:=BPJZ *0.98;LS11:=IF(1,LS0=1,DYKX);LS21:=IF(1,LLV(L,1)>REF(L,1),1);DYBP:=LS11 AND LS21;STICKLINE(DYBP,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP,WZX2,'1'),COLORGREEN;LS12:=IF(2,LS0=2,DYKX);LS22:=IF(2,LLV(L,2)>REF(L,2),1);DYBP2:=LS12 AND LS22;STICKLINE(DYBP2,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP2,WZX2,'2'),COLORGREEN;LS13:=IF(3,LS0=3,DYKX);LS23:=IF(3,LLV(L,3)>REF(L,3),1);DYBP3:=LS13 AND LS23;STICKLINE(DYBP3,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP3,WZX2,'3'),COLORGREEN;LS14:=IF(4,LS0=4,DYKX);LS24:=IF(4,LLV(L,4)>REF(L,4),1);DYBP4:=LS14 AND LS24;STICKLINE(DYBP4,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP4,WZX2,'4'),COLORGREEN;LS15:=IF(5,LS0=5,DYKX);LS25:=IF(5,LLV(L,5)>REF(L,5),1);DYBP5:=LS15 AND LS25;STICKLINE(DYBP5,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP5,WZX2,'5'),COLORGREEN;LS16:=IF(6,LS0=6,DYKX);LS26:=IF(6,LLV(L,6)>REF(L,6),1);DYBP6:=LS16 AND LS26;STICKLINE(DYBP6,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP6,WZX2,'6'),COLORGREEN;LS17:=IF(7,LS0=7,DYKX);LS27:=IF(7,LLV(L,7)>REF(L,7),1);DYBP7:=LS17 AND LS27;STICKLINE(DYBP7,WZX1,BPJZ,4,0),COLORMAGENTA; DRAWTEXT(DYBP7,WZX2,'7'),COLORGREEN;LS18:=IF(8,LS0=8,DYKX);LS28:=IF(8,LLV(L,8)>REF(L,8),1);DYBP8:=LS18 AND LS28;STICKLINE(DYBP8,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP8,WZX2,'8'),COLORGREEN;LS19:=IF(9,LS0=9,DYKX);LS29:=IF(9,LLV(L,9)>REF(L,9),1);DYBP9:=LS19 AND LS29;STICKLINE(DYBP9,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP9,WZX2,'9'),COLORGREEN;LS110:=IF(10,LS0=10,DYKX);LS210:=IF(10,LLV(L,10)>REF(L,10),1);DYBP10:=LS110 AND LS210;STICKLINE(DYBP10,WZX1,BPJZ,4,0),COLORMAGENTA;DRAWTEXT(DYBP10,WZX2,'10'),COLORGREEN;DIF:=EMA(CLOSE,8)-EMA(CLOSE,13);DEA:=EMA(DIF,6);TCMACD:=2*(DIF-DEA);GD1:=EVERY(DIF>REF(DIF,1),BARSLASTCOUNT(DIF>DEA))AND DIF>DEA;GD2:=EVERY(TCMACD>REF(TCMACD,1),BARSLASTCOUNT(DIF>DEA))AND DIF>DEA; GD:=MAX(GD1,GD2);GDWZ1:=REF(MAX(C,O),BARSLAST(GD1)+1);GDWZ2:=REF(MAX(C,O),BARSLAST(GD2)+1);GDWZ:=IF(GDWZ2>=GDWZ1,GDWZ2,GDWZ1);AA:=HHV(IF(C>O,C,MAX(C,O)),BARSLASTCOUNT(GDWZ)+1)=HHV(IF(C>O,C,MAX(C,O)) ,BARSLASTCOUNT(BBI>REF(BBI,1)AND C>BBI));AA1:=REF(CLOSE,1);压力2:DRAWLINE(BARSLAST(AA)=0,IF(C>O,C,MAX(C,O)),BARSNEXT(AA),REF(IF(C>O,C,MAX (C,O)),BARSLAST(AA)),1),DOTLINE,COLORYELLOW;LD1:=EVERY(DIF<REF(DIF,1),BARSLASTCOUNT(DIF<DEA))AND DIF<DEA;LD2:=EVERY(TCMACD<REF(TCMACD,1),BARSLASTCOUNT(DIF<DEA))AND DIF<DEA; LD:=MIN(LD1,LD2);DDWZ1:=REF(MIN(C,O),BARSLAST(LD1)+1);DDWZ2:=REF(MIN(C,O),BARSLAST(LD2)+1);DDWZ:=IF(DDWZ2<=DDWZ1,DDWZ1,DDWZ2);BB:=LLV(IF(C<O,C,MIN(C,O)),BARSLASTCOUNT(LD)+1)=LLV(IF(C<O,C,MIN(C,O)),BARS LASTCOUNT(DIF<REF(DIF,1) AND BBI<REF(BBI,1)}AND L<BBI));ZCWZ:DRAWLINE(BARSLAST(BB)=0,IF(C<O,C,MIN(C,O)),BARSNEXT(BB),REF(IF(C<O,C, MIN(C,O)),BARSLAST(BB)),1),DOTLINE,COLORGREEN;DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95*1.015,HHV(C,5)*0.95),COLORWHITE; STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,50,0),COLORWHITE;DRAWTEXT(ISLASTBAR,HHV(C,5)*0.95*0.99,'止损价位'),COLORWHITE;MA60:=MA(C,60);GLV60:=(C-MA60)/MA60*100;DRAWTEXT_FIX(1,0.05,0.1,0,STRCAT('乖离率: ',CON2STR(GLV60,2))),COLORYELLOW; DRAWTEXT_FIX(1,0.15,0.1,0,STRCAT(DYBLOCK,STRCAT('--',STRCAT(HYBLOCK,STRCAT( '--',GNBLOCK))))),COLORYELLOW;DRAWTEXT_FIX(1,0.05,0.15,0,STRCAT('市盈率:',CON2STR(DYNAINFO(39),2))),COLORRED;DRAWTEXT_FIX(1,0.15,0.15,0,STRCAT('市净率:',CON2STR(C/FINANCE(34),2))),COLORRED;。
通达信指标公式源码自动画线主图指标公式
通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T; VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) ANDCLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。
艾略特波浪划线通达信指标公式源码
艾略特波浪划线主图:艾略特波浪理论的五浪划线,方便看盘和技术分析X:=5;D:=10;M5:MA(C,X);M10:MA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(CONST(M5)>CONST(M10),HHV(H,T+1),REF(HHV(H,T+1),ST));L1:=IF(CONST(M5)<CONST(M10),LLV(L,ST+1),REF(LLV(L,ST+1),T));H2:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST1-1),REF(HHV(H,T+1),ST2-1)); L3:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T1-1),REF(LLV(L,ST+1),T2-1)); TJ1:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T2) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ2:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ3:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ4:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ5:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T)+1 AND CURRBARSCOUNT<=CONST(ST)+1 AND L=CONST(L1);TJ6:=CONST(M5)>CONST(M10) AND H=CONST(H1) ANDCURRBARSCOUNT<=CONST(ST2);TJ7:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST2) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ8:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ9:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ10:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ11:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST)+1 AND CURRBARSCOUNT<=CONST(T)+1 AND H=CONST(H1);TJ12:=CONST(M5)<CONST(M10) AND L=CONST(L1)ANDCURRBARSCOUNT<=CONST(T2);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=CONST(MAX(MAX(H1,H2),H3));LL:=CONST(MIN(MIN(L1,L2),L3));Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,DOTLINE;DRAWTEXT(TJ7,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z),2)),'元')),COLORGREEN;HH1:=CONST(MAX(H1,MAX(H2,H3)));LL1:=CONST(MIN(MIN(L1,L2),L3));Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,DOTLINE;DRAWTEXT(TJ1,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z1),2)),'元')),COLORMAGENTA;近高:H1,COLORMAGENTA,NODRAW;近低:L1,COLORGREEN,NODRAW;中高:H2,COLORMAGENTA,NODRAW;中底:L2,COLORGREEN,NODRAW;远高:H3,COLORMAGENTA,NODRAW;远底:L3,COLORGREEN,NODRAW;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,13);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,26);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,55);走强一:=BARSLAST(PL5<REF(PL5,1));走弱一:=BARSLAST(PL5>REF(PL5,1));走强二:=BARSLAST(PL10<REF(PL10,1));走弱二:=BARSLAST(PL10>REF(PL10,1));走强三:=BARSLAST(PL20<REF(PL20,1));走弱三:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱二),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱二),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强三),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱三),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱三),0);DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.98,'(Ⅰ)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.02,'(Ⅱ)'),COLORFFFF00; DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.98,'(Ⅲ)'),COLORFFFF00; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'⑴'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'⑵'),COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'⑶'),COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'⑷'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'【A】'),COLOR00FF00; DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.03,'【B】'),COLOR00FF00; DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'【C】'),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'①'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.94,'②'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'③'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.94,'④'),LINETHICK3,COLOR00FFFF;DMLJ:=HHV(HIGH,120);TY:=CLOSE;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10); A:=REF(CLOSE,BARSLAST(HD));B:=REF(CLOSE,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2;STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100; VAR7:=0;VAR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)), 7)*100;VAR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)), 13)*100;VARA:=BARSCOUNT(CLOSE);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND COUNT(VARB,1)=1;VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);VARE:=EMA(VARD,5);VARF:=TROUGH(3,6,1)<4 AND CROSS(VARD,VARE);VAR10:=IF(TROUGH(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(HIGH+LOW+CLOSE)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,LOW);买点一:=VAR10;买点二:=(VAR11+VAR13+VAR15+VAR17);卖点一:=(VAR12+VAR14+VAR16+VAR18);VAR22:=买点一AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110);VAR1:=MA(CLOSE,6);VAR2:=MA(CLOSE,18);VAR31:=MA(CLOSE,30);VARB1:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);VARC1:=INTPART(VARB1*100)/100;VARD1:=EMA(CLOSE,5)-EMA(CLOSE,10);VARE1:=EMA(VARD1,9);VAR131:=REF(VARE1,1);VAR141:=VARE1;VAR151:=VAR141-VAR131;VAR161:=REF(VARD1,1);VAR171:=VARD1;VAR181:=VAR171-VAR161;VAR191:=OPEN;VAR1A1:=CLOSE;DRAWTEXT(买点一>0,LOW-0.01,'▲买!'),COLORRED; DRAWTEXT(买点二>0,LOW-0.01,'▲买涨'),COLORYELLOW; DRAWTEXT(卖点一>0,HIGH+0.1,'▼卖跌'), COLORWHITE;A1:=BARSCOUNT(CLOSE);AH:=HHV(HIGH,72);AL:=LLV(LOW,72);A0:=(AH-AL)/21;B1:=LOW-A0;DRAWTEXT((A1+0)/15=FLOOR((A1+0)/15),B1-2.5*A0,'▲时窗'),COLORWHITE;VAR51:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1)AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);STICKLINE(VAR51=2,LOW*0.95,LOW*0.98,8,0),COLOR0000FF; DRAWTEXT(VAR51=2,LOW*0.95,'3天'),COLORWHITE; STICKLINE(VAR51=4,HIGH*1.05,HIGH*1.02,8,0),COLOR9966FF; DRAWTEXT(VAR51=4,HIGH*1.06,'5天'),COLORWHITE; STICKLINE(VAR51=7,LOW*0.95,LOW*0.98,8,0),COLOR00FFFF; DRAWTEXT(VAR51=7,LOW*0.95,'8天'),COLORWHITE; STICKLINE(VAR51=12,HIGH*1.05,HIGH*1.02,8,0),COLORFF33FF; DRAWTEXT(VAR51=12,HIGH*1.06,'13天'),COLORWHITE; STICKLINE(VAR51=20,LOW*0.95,LOW*0.98,8,0),COLOR0066FF; DRAWTEXT(VAR51=20,LOW*0.95,'21天'),COLORWHITE; STICKLINE(VAR51=33,HIGH*1.05,HIGH*1.02,8,0),COLORFFFF00; DRAWTEXT(VAR51=33,HIGH*1.06,'34天'),COLORWHITE; STICKLINE(VAR51=54,LOW*0.95,LOW*0.98,8,0),COLORWHITE; DRAWTEXT(VAR51=54,LOW*0.95,'55天'),COLORWHITE; STICKLINE(VAR51=88,HIGH*1.05,HIGH*1.02,8,0),COLOR00FF00; DRAWTEXT(VAR51=88,HIGH*1.06,'89天'),COLORWHITE; STICKLINE(VAR51=143,LOW*0.95,LOW*0.98,8,0),COLORCCFFFF; DRAWTEXT(VAR51=143,LOW*0.95,'144天'),COLORWHITE; STICKLINE(VAR51=232 ,HIGH*1.05,HIGH*1.02,8,0),COLORFF0033;DRAWTEXT(VAR51=232,HIGH*1.06,'233天'),COLORWHITE; STICKLINE(VAR51=376,LOW*0.95,LOW*0.98,8,0),COLORFF9966; DRAWTEXT(VAR51=376,LOW*0.95,'377天'),COLORWHITE;立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2);雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2);惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2);春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2);清明:=FILTER(MONTH=4 AND (DAY=3 OR DAY=6 ),2);谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2);立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2);小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2);芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2);夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2);小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2);大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2);立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2);处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2);白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2);秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2);寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2);霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2);立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2);小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2);大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2);冬至:=FILTER(MONTH=12 AND (DAY=21 OR DAY=23),2);小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2);大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=21),2); GET:ZIG(3,5),COLORWHITE,LINETHICK1;。