通达信指标公式源码 极限顶底与半分位主图指标
通达信顶底分型线段缠论主图指标公式
通达信顶底分型线段缠论主图指标公式局部低点预选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);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);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)COLORBLUE;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE;DRAWICON(极点保留=-1,L-0.03,1);DRAWICON(极点保留=1,H+0.03,2);。
通达信底顶指标公式
通达信底顶指标公式以下是通达信底顶指标的公式和解释:1.底部形态指标公式(1)最近一个底部形态的高点:DHLDHL=REF(HHV(HIGH,20),1)(2)价格打破最近一个底部形态的高点DHLBREAK=LLV(LOW,20)<DHL(3)最近一个底部形态的低点:DLLDLL=REF(LLV(LOW,20),1)(4)价格低于最近一个底部形态的低点DLLBREAK=HHV(HIGH,20)>DLL(5)价格向上的力量:DIRDIR=SMA(CLOSE,7,1)-SMA(CLOSE,70,1)(6)价格向上的力量大于0DIRUP=DIR>0(7)底部形态确认CONDITION1=NOTDIRUPANDDHLBREAKANDSMA(VOLUME,20)>2*MA(VOLUME, 100)2.顶部形态指标公式(1)最近一个顶部形态的低点:DLLDLL=REF(LLV(LOW,20),1)(2)价格低于最近一个顶部形态的低点DLLBREAK=HHV(HIGH,20)>DLL(3)最近一个顶部形态的高点:DHLDHL=REF(HHV(HIGH,20),1)(4)价格打破最近一个顶部形态的高点DHLBREAK=LLV(LOW,20)<DHL(5)价格向下的力量:DIRDIR=SMA(CLOSE,70,1)-SMA(CLOSE,7,1)(6)价格向下的力量小于0DIRDOWN=DIR<0(7)顶部形态确认CONDITION2=NOTDIRDOWNANDDLLBREAKANDSMA(VOLUME,20)>2*MA(VOLUM E,100)通过计算这些指标,我们可以完成对底部和顶部形态的判断。
具体解释如下:底部形态指标的解释:条件1(底部形态确认)需要满足以下三个条件:(a)价格向上的力量(DIR)小于0,即价格下跌;(b)价格打破最近一个底部形态的高点(DHLBREAK);(c)成交量的移动平均值(VOLUME)的20日均线(MA)大于成交量的移动平均值的100日均线的两倍。
顶底决策通达信指标公式源码高成功率
各位股友,是不是每天都在找指标呢?是不是每天都在验证指标呢?是不是希望有一个精准决策的指标呢?其实,所有指标,都没有100%的准确率的,大多数指标,都离不开:开盘价、收盘价、最低价、最高价、成交量、成交额、流入流出资金等,这几个参数的,所谓不同的指标,不过是把这些参数,使用不同的数学方法进行演算而已,所有劝告各位股友,不必再寻找过多的指标了,把最基础的(MA、MACD、KDJ、CCI、WR 等)指标,研究透彻就足够再辅以几个自己信赖的自编指标,就能应对了(关键是操作纪律)在此,分享一个自己制作的简单顶底研判指标,源码公开,欢迎各位指标爱好者进行优化NOTEXT1:10,COLORBLUE,DOTLINE;NOTEXT2:15,COLORMAGENTA,DOTLINE;NOTEXT3:85,COLORYELLOW,DOTLINE;NOTEXT4:90,COLORBLUE,DOTLINE;NOTEXT5:50,COLORWHITE,DOTLINE;DRAWTEXT(ISLASTBAR,10,' 底'),COLORRED;DRAWTEXT(ISLASTBAR,15,' 预备'),COLORMAGENTA;DRAWTEXT(ISLASTBAR,85,' 预备'),COLORYELLOW;DRAWTEXT(ISLASTBAR,90,' 顶'),COLORGREEN;M:=IF(LLV(C,30)=LLV(C,60),21,IF(LLV(C,60)=LLV(C,120),34,55)); DDDS:=EMA((C-LLV(L,M))/(HHV(H,M)-LLV(L,M))*100,5);快线:SMA(SMA(DDDS,2,1),2,1),COLORRED,LINETHICK2;慢线:SMA(SMA(快线,2,1),2,1),COLORGREEN,LINETHICK2;大顶:DRAWICON(CROSS(快线,89),快线,35);大底:DRAWICON(CROSS(快线,11),快线,34);历史最低:=CONST(LLV(快线,0));历史最高:=CONST(HHV(快线,0));触底率:((100-快线)/(100-历史最低))*100,NODRAW,COLORRED; 碰顶率:((快线)/(历史最高))*100,NODRAW,COLORGREEN;。
[通达信]通达信超级顶底优化指标公式(副图源码)
[通达信]通达信超级顶底优化指标公式(副图源码)VARV:=(2*C+H+L)/4;VARU:=LLV(LOW,30);VARA1:=HHV(HIGH,30);B:=EMA((VARV-VARU)/(VARA1-VARU)*100,8);B1:=EMA(B,5);STICKLINE(B-B1>0,B,B1,8,1),COLORRED;STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;低吸:IF(CROSS(RSI,11),70,0),COLORWHITE,POINTDOT;STICKLINE(低吸,70,0,4,0),COLORWHITE;VAR7:=EMA(AMOUNT/VOL/100,3);VAR8:=EMA(VAR7,88);VAR9:=EMA(VAR7,88)*0.85;VARA:=VAR9*0.87;VARB:=LOW<VARA AND CLOSE>REF(CLOSE,1)*1.02;STICKLINE(FILTER(VARB,6),65,0,4,0),COLORFF00FF;坚决买进:IF(FILTER(VARB,6),65,0),COLORFF00FF,POINTDOT;VARF:=(2*CLOSE+HIGH+LOW)/4;VA4:=LLV(LOW,34);VA5:=HHV(HIGH,34);VA6:=EMA((VARF-VA4)/(VA5-VA4)*100,6);VA7:=EMA(0.667*REF(VA6,1)+0.333*VA6,4);出击:IF(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VA6>VA7,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0),60,0),COLORYELLOW,POINTDOT;STICKLINE(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 ANDCOUNT(VA6>VA7,3) ANDREF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0),60,0,4,0),COLORYELLOW;A:=(3*CLOSE+LOW+OPEN+HIGH)/6;D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF( A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*R EF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*RE F(A,17)+2*REF(A,18)+REF(A,20))/211;D2:=EMA(D1,2);D3:=EMA(D2,2);K1:=EMA(D3,2);波段买入:IF(CROSS(D1,K1),55,0),COLOR0099FF,POINTDOT;STICKLINE(CROSS(D1,K1),55,0,4,0),COLOR0099FF;多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);天线:=78.89;STICKLINE(CROSS(天线,多方趋势),90,95,6,0),COLOR00FF00;STICKLINE(B>0 AND B-B1>=0,79,80,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,79,80,6,0),COLOR00FF00;STICKLINE(B>0 AND B-B1>=0,49,50,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,49,50,6,0),COLORFF8899;STICKLINE(B>0 AND B-B1>=0,19,20,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,19,20,6,0),COLOR00FF00;STICKLINE(B-B1>0,B,B1,8,1),COLORRED;STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;地量:DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0),L*1,'地量'),COLOR00FFFF;STICKLINE(地量>0,0,30,2,0),COLOR008888;STICKLINE(地量>0,0,30,1.5,0),COLOR00AAAA;STICKLINE(地量>0,0,30,0.8,0),COLOR00DDDD;STICKLINE(地量>0,0,30,0.3,0),COLOR00FFFF;VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),10,15);VAR10:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR11:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR12:=VAR10<REF(VAR11,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR12 AND COUNT(VAR12,30)=1,40,'有大资金进场迹象,关注!');。
通达信指标公式源码顶底趋势指标
90,COLOR9966FF,LINETHICK2;80,COLOR996699;20,COLORGREEN;10,COLORCC6633,LINETHICK2;长期线:MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100,COLOR9900FF; 短期线:-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))+100,COLOR888888;中期线:EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLORYELLOW,LINET HICK2;见顶:(REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线) ;顶部区域:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5AND 短期线<中期线AND 短期线<长期线+4;顶部:=FILTER(顶部区域,4);底部区域:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1) ;STICKLINE( 顶部,99,103,20,1 ),COLORRED,COLORGREEN;低位金叉:长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线OR REF( 短期线,1)<1 ); STICKLINE( 低位金叉,0,5,11,0 ),COLORRED;。
通达信指标公式源码顶底先知 主图指标 源码
VV:=(O+C+L+H)/4;Y311:=IFF(CURRBARSCOUNT=1,(XMA(VV,3)*3-MA(VV,2)+VV)/3,XMA(VV,3)); Y312:=IFF(CURRBARSCOUNT=1,(XMA(Y311,3)*3-MA(Y311,2)+Y311)/3,XMA( Y311,3));Y313:=IFF(CURRBARSCOUNT=1,(XMA(Y312,3)*3-MA(Y312,2)+Y312)/3,XMA( Y312,3));Y314:=IFF(CURRBARSCOUNT=1,(XMA(Y313,3)*3-MA(Y313,2)+Y313)/3,XMA( Y313,3));Y315:=IFF(CURRBARSCOUNT=1,(XMA(Y314,3)*3-MA(Y314,2)+Y314)/3,XMA( Y314,3));Y316:=IFF(CURRBARSCOUNT=1,(XMA(Y315,3)*3-MA(Y315,2)+Y315)/3,XMA( Y315,3));Y317:=IFF(CURRBARSCOUNT=1,(XMA(Y316,3)*3-MA(Y316,2)+Y316)/3,XMA( Y316,3));Y318:=IFF(CURRBARSCOUNT=1,(XMA(Y317,3)*3-MA(Y317,2)+Y317)/3,XMA( Y317,3));Y319:=IFF(CURRBARSCOUNT=1,(XMA(Y318,3)*3-MA(Y318,2)+Y318)/3,XMA( Y318,3));Y320:=IFF(CURRBARSCOUNT=1,(XMA(Y319,3)*3-MA(Y319,2)+Y319)/3,XMA( Y319,3));Y321:=IFF(CURRBARSCOUNT=1,(XMA(Y320,3)*3-MA(Y320,2)+Y320)/3,XMA( Y320,3));Y322:=IFF(CURRBARSCOUNT=1,(XMA(Y321,3)*3-MA(Y321,2)+Y321)/3,XMA(Y323:=IFF(CURRBARSCOUNT=1,(XMA(Y322,3)*3-MA(Y322,2)+Y322)/3,XMA( Y322,3));Y324:=IFF(CURRBARSCOUNT=1,(XMA(Y323,3)*3-MA(Y323,2)+Y323)/3,XMA( Y323,3));Y325:=IFF(CURRBARSCOUNT=1,(XMA(Y324,3)*3-MA(Y324,2)+Y324)/3,XMA( Y324,3));Y326:=IFF(CURRBARSCOUNT=1,(XMA(Y325,3)*3-MA(Y325,2)+Y325)/3,XMA( Y325,3));Y327:=IFF(CURRBARSCOUNT=1,(XMA(Y326,3)*3-MA(Y326,2)+Y326)/3,XMA( Y326,3));Y328:=IFF(CURRBARSCOUNT=1,(XMA(Y327,3)*3-MA(Y327,2)+Y327)/3,XMA( Y327,3));Y329:=IFF(CURRBARSCOUNT=1,(XMA(Y328,3)*3-MA(Y328,2)+Y328)/3,XMA( Y328,3));Y330:=IFF(CURRBARSCOUNT=1,(XMA(Y329,3)*3-MA(Y329,2)+Y329)/3,XMA( Y329,3));Y331:=IFF(CURRBARSCOUNT=1,(XMA(Y330,3)*3-MA(Y330,2)+Y330)/3,XMA( Y330,3));Y332:=IFF(CURRBARSCOUNT=1,(XMA(Y331,3)*3-MA(Y331,2)+Y331)/3,XMA( Y331,3));Y333:=IFF(CURRBARSCOUNT=1,(XMA(Y332,3)*3-MA(Y332,2)+Y332)/3,XMA( Y332,3));Y334:=IFF(CURRBARSCOUNT=1,(XMA(Y333,3)*3-MA(Y333,2)+Y333)/3,XMA( Y333,3));Y335:=IFF(CURRBARSCOUNT=1,(XMA(Y334,3)*3-MA(Y334,2)+Y334)/3,XMA( Y334,3));Y336:=IFF(CURRBARSCOUNT=1,(XMA(Y335,3)*3-MA(Y335,2)+Y335)/3,XMA( Y335,3));Y337:=IFF(CURRBARSCOUNT=1,(XMA(Y336,3)*3-MA(Y336,2)+Y336)/3,XMA( Y336,3));Y338:=IFF(CURRBARSCOUNT=1,(XMA(Y337,3)*3-MA(Y337,2)+Y337)/3,XMA( Y337,3));Y339:=IFF(CURRBARSCOUNT=1,(XMA(Y338,3)*3-MA(Y338,2)+Y338)/3,XMA( Y338,3));Y340:=IFF(CURRBARSCOUNT=1,(XMA(Y339,3)*3-MA(Y339,2)+Y339)/3,XMA( Y339,3));Y341:=IFF(CURRBARSCOUNT=1,(XMA(Y340,3)*3-MA(Y340,2)+Y340)/3,XMA( Y340,3));Y342:=IFF(CURRBARSCOUNT=1,(XMA(Y341,3)*3-MA(Y341,2)+Y341)/3,XMA( Y341,3));Y343:=IFF(CURRBARSCOUNT=1,(XMA(Y342,3)*3-MA(Y342,2)+Y342)/3,XMA( Y342,3));Y344:=IFF(CURRBARSCOUNT=1,(XMA(Y343,3)*3-MA(Y343,2)+Y343)/3,XMA(Y345:=IFF(CURRBARSCOUNT=1,(XMA(Y344,3)*3-MA(Y344,2)+Y344)/3,XMA( Y344,3));Y346:=IFF(CURRBARSCOUNT=1,(XMA(Y345,3)*3-MA(Y345,2)+Y345)/3,XMA( Y345,3));Y347:=IFF(CURRBARSCOUNT=1,(XMA(Y346,3)*3-MA(Y346,2)+Y346)/3,XMA( Y346,3));Y348:=IFF(CURRBARSCOUNT=1,(XMA(Y347,3)*3-MA(Y347,2)+Y347)/3,XMA( Y347,3));Y349:=IFF(CURRBARSCOUNT=1,(XMA(Y348,3)*3-MA(Y348,2)+Y348)/3,XMA( Y348,3));Y350:=IFF(CURRBARSCOUNT=1,(XMA(Y349,3)*3-MA(Y349,2)+Y349)/3,XMA( Y349,3));Y351:=IFF(CURRBARSCOUNT=1,(XMA(Y350,3)*3-MA(Y350,2)+Y350)/3,XMA( Y350,3));Y352:=IFF(CURRBARSCOUNT=1,(XMA(Y351,3)*3-MA(Y351,2)+Y351)/3,XMA( Y351,3));Y353:=IFF(CURRBARSCOUNT=1,(XMA(Y352,3)*3-MA(Y352,2)+Y352)/3,XMA( Y352,3));Y354:=IFF(CURRBARSCOUNT=1,(XMA(Y353,3)*3-MA(Y353,2)+Y353)/3,XMA( Y353,3));Y355:=IFF(CURRBARSCOUNT=1,(XMA(Y354,3)*3-MA(Y354,2)+Y354)/3,XMA( Y354,3));Y356:=IFF(CURRBARSCOUNT=1,(XMA(Y355,3)*3-MA(Y355,2)+Y355)/3,XMA( Y355,3));Y357:=IFF(CURRBARSCOUNT=1,(XMA(Y356,3)*3-MA(Y356,2)+Y356)/3,XMA( Y356,3));Y358:=IFF(CURRBARSCOUNT=1,(XMA(Y357,3)*3-MA(Y357,2)+Y357)/3,XMA( Y357,3));Y359:=IFF(CURRBARSCOUNT=1,(XMA(Y358,3)*3-MA(Y358,2)+Y358)/3,XMA( Y358,3));Y360:=IFF(CURRBARSCOUNT=1,(XMA(Y359,3)*3-MA(Y359,2)+Y359)/3,XMA( Y359,3));Y361:=IFF(CURRBARSCOUNT=1,(XMA(Y360,3)*3-MA(Y360,2)+Y360)/3,XMA( Y360,3));Y362:=IFF(CURRBARSCOUNT=1,(XMA(Y361,3)*3-MA(Y361,2)+Y361)/3,XMA( Y361,3));Y363:=IFF(CURRBARSCOUNT=1,(XMA(Y362,3)*3-MA(Y362,2)+Y362)/3,XMA( Y362,3));Y364:=IFF(CURRBARSCOUNT=1,(XMA(Y363,3)*3-MA(Y363,2)+Y363)/3,XMA( Y363,3));Y365:=IFF(CURRBARSCOUNT=1,(XMA(Y364,3)*3-MA(Y364,2)+Y364)/3,XMA( Y364,3));Y366:=IFF(CURRBARSCOUNT=1,(XMA(Y365,3)*3-MA(Y365,2)+Y365)/3,XMA(Y367:=IFF(CURRBARSCOUNT=1,(XMA(Y366,3)*3-MA(Y366,2)+Y366)/3,XMA( Y366,3));Y368:=IFF(CURRBARSCOUNT=1,(XMA(Y367,3)*3-MA(Y367,2)+Y367)/3,XMA( Y367,3));Y369:=IFF(CURRBARSCOUNT=1,(XMA(Y368,3)*3-MA(Y368,2)+Y368)/3,XMA( Y368,3));Y370:=IFF(CURRBARSCOUNT=1,(XMA(Y369,3)*3-MA(Y369,2)+Y369)/3,XMA( Y369,3));Y371:=IFF(CURRBARSCOUNT=1,(XMA(Y370,3)*3-MA(Y370,2)+Y370)/3,XMA( Y370,3));Y372:=IFF(CURRBARSCOUNT=1,(XMA(Y371,3)*3-MA(Y371,2)+Y371)/3,XMA( Y371,3));Y373:=IFF(CURRBARSCOUNT=1,(XMA(Y372,3)*3-MA(Y372,2)+Y372)/3,XMA( Y372,3));Y374:=IFF(CURRBARSCOUNT=1,(XMA(Y373,3)*3-MA(Y373,2)+Y373)/3,XMA( Y373,3));Y375:=IFF(CURRBARSCOUNT=1,(XMA(Y374,3)*3-MA(Y374,2)+Y374)/3,XMA( Y374,3));Y376:=IFF(CURRBARSCOUNT=1,(XMA(Y375,3)*3-MA(Y375,2)+Y375)/3,XMA( Y375,3));Y377:=IFF(CURRBARSCOUNT=1,(XMA(Y376,3)*3-MA(Y376,2)+Y376)/3,XMA( Y376,3));Y378:=IFF(CURRBARSCOUNT=1,(XMA(Y377,3)*3-MA(Y377,2)+Y377)/3,XMA( Y377,3));Y379:=IFF(CURRBARSCOUNT=1,(XMA(Y378,3)*3-MA(Y378,2)+Y378)/3,XMA( Y378,3));Y380:=IFF(CURRBARSCOUNT=1,(XMA(Y379,3)*3-MA(Y379,2)+Y379)/3,XMA( Y379,3));Y381:=IFF(CURRBARSCOUNT=1,(XMA(Y380,3)*3-MA(Y380,2)+Y380)/3,XMA( Y380,3));Y382:=IFF(CURRBARSCOUNT=1,(XMA(Y381,3)*3-MA(Y381,2)+Y381)/3,XMA( Y381,3));Y383:=IFF(CURRBARSCOUNT=1,(XMA(Y382,3)*3-MA(Y382,2)+Y382)/3,XMA( Y382,3));Y384:=IFF(CURRBARSCOUNT=1,(XMA(Y383,3)*3-MA(Y383,2)+Y383)/3,XMA( Y383,3));Y385:=IFF(CURRBARSCOUNT=1,(XMA(Y384,3)*3-MA(Y384,2)+Y384)/3,XMA( Y384,3));Y386:=IFF(CURRBARSCOUNT=1,(XMA(Y385,3)*3-MA(Y385,2)+Y385)/3,XMA( Y385,3));Y387:=IFF(CURRBARSCOUNT=1,(XMA(Y386,3)*3-MA(Y386,2)+Y386)/3,XMA( Y386,3));Y388:=IFF(CURRBARSCOUNT=1,(XMA(Y387,3)*3-MA(Y387,2)+Y387)/3,XMA(Y389:=IFF(CURRBARSCOUNT=1,(XMA(Y388,3)*3-MA(Y388,2)+Y388)/3,XMA( Y388,3));Y390:=IFF(CURRBARSCOUNT=1,(XMA(Y389,3)*3-MA(Y389,2)+Y389)/3,XMA( Y389,3));Y391:=IFF(CURRBARSCOUNT=1,(XMA(Y390,3)*3-MA(Y390,2)+Y390)/3,XMA( Y390,3));Y392:=IFF(CURRBARSCOUNT=1,(XMA(Y391,3)*3-MA(Y391,2)+Y391)/3,XMA( Y391,3));Y393:=IFF(CURRBARSCOUNT=1,(XMA(Y392,3)*3-MA(Y392,2)+Y392)/3,XMA( Y392,3));Y394:=IFF(CURRBARSCOUNT=1,(XMA(Y393,3)*3-MA(Y393,2)+Y393)/3,XMA( Y393,3));Y395:=IFF(CURRBARSCOUNT=1,(XMA(Y394,3)*3-MA(Y394,2)+Y394)/3,XMA( Y394,3));N:= 200 ; M:= 13;{DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'12',0)};DRAWKLINE(H,O,L,C);股价96:=Y395;增幅96:=XMA(XMA(XMA(股价96,3),3),3)-REF(XMA(XMA(XMA(股价96,3),3),3),1);X396:=XMA(股价96,3);J396:=(XMA(股价96,3)*3+0.5*股价96-0.5*REF(股价96,1)+增幅96)/3;Y396:=IFF(CURRBARSCOUNT=1,J396,X396),LINETHICK2,COLORGREEN;高险区1:Y396*1.1,COLORLIRED,COLORFFFF00;高险区2:Y396*1.125,COLORLIRED,COLORFF0000;高险区3:Y396*1.15,COLORLIRED,COLOR00FF00;良机区1:Y396*0.9,COLORLIBLUE,COLOR00FFFF;良机区2:Y396*0.875,COLORLIBLUE,COLORFF00FF;良机区3:Y396*0.85,COLOR0000FF;WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;WSR2:=CROSS(WSR1,5);WSR3:=CROSS(8,WSR1);WSR4:=CROSS(WSR1,-5);WSR5:=CROSS(WSR1,-8);WSR6:=WSR3;WSR7:=WSR4 OR WSR5;WSR8:=WSR7 AND FILTER(WSR7,5);WSR10:DRAWICON(WSR8,L-0.01,1);WSR9:=WSR6 AND FILTER(WSR6,5);WSR11:DRAWICON(WSR9,H+0.01,2);WSR12:=O<良机区3;DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1);W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1); XG:=W1 OR W2;VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,10)/VAR1/7;VAR4:=DMA(VAR2,VOL/VAR3);VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);XG3:=XG AND XG1 AND L<良机区1;WSR13:=O>良机区3 AND L<良机区1 OR XG3;DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,23);WSR14:=H>高风区3;DRAWICON(WSR14 ANDFILTER(WSR14,15),H+0.03,19);WSR15:=H<高风区3 AND H>高风区2;DRAWICON(WSR15 ANDFILTER(WSR15,5),H+0.03,15);WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);WSR19:=(WSR16 + WSR17 + WSR18)/3;WSR20:=(C-MA(C,3))/MA(C,3);WSR21:=(C-MA(C,8))/MA(C,8);WSR22:=(C-MA(C,18))/MA(C,18);WSR23:=(WSR20 + WSR21 + WSR22)/3;WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);WSR28:=(WSR25 + WSR26 + WSR27)/3;WSR29:=(C-MA(C,6))/MA(C,6);WSR30:=(C-MA(C,12))/MA(C,12);WSR31:=(C-MA(C,24))/MA(C,24);WSR32:=(WSR29 + WSR30 + WSR31)/3;WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR37:=(WSR34 + WSR35 + WSR36)/3;WSR38:=(C-MA(C,13))/MA(C,13);WSR39:=(C-MA(C,34))/MA(C,34);WSR40:=(C-MA(C,55))/MA(C,55);WSR41:=(WSR38 + WSR39 + WSR40)/3;WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR46:=(WSR43 + WSR44 + WSR45)/3;WSR47:=(C-MA(C,30))/MA(C,30);WSR48:=(C-MA(C,60))/MA(C,60);WSR49:=(C-MA(C,90))/MA(C,90);WSR50:=(WSR47 + WSR48 + WSR49)/3;WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);WSR55:=(WSR52 + WSR53 + WSR54)/3;WSR56:=(C-MA(C,60))/MA(C,60);WSR57:=(C-MA(C,120))/MA(C,120);WSR58:=(C-MA(C,220))/MA(C,220);WSR59:=(WSR56 + WSR57 + WSR58)/3;WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60; DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3,'★'),COLOR00FFFF;DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3*0.97,'机'),COLOR00FFFF;时间之窗:=HHVBARS(ZIG(3,M)>REF(ZIG(3,M),1)AND REF(ZIG(3,M), 1)<REF(ZIG(3,M), 2),N);DRAWTEXT(时间之窗=2,L*0.94,'★3天'),COLORRED;DRAWTEXT(时间之窗=4,H*1.06,'★5天'),COLORGREEN;DRAWTEXT(时间之窗=7,L*0.94,'★8天'),COLORRED;DRAWTEXT(时间之窗=12,H*1.06,'★13天'),COLORGREEN;DRAWTEXT(时间之窗=20,L*0.94,'★21天'),COLORLIRED;DRAWTEXT(时间之窗=33,H*1.06,'★34天'),COLORLIGREEN;DRAWTEXT(时间之窗=54,L*0.94,'★55天'),COLORLIRED;{DRAWTEXT(时间之窗=88,H*1.06,'★89天'),COLORLIGREEN; DRAWTEXT(时间之窗=143,L*0.94,'★144天'),COLORLIRED;DRAWTEXT(时间之窗=232,H*1.06,'★233天'),COLORLIGREEN; DRAWTEXT(时间之窗=376,L*0.94,'★377天'),COLORLIRED;DRAWTEXT(时间之窗=609,H*1.06,'★610天'),COLORLIGREEN; };GET:=ZIG(3,3),COLORFFFFFF;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,10);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,20);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,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE(涨停,H,L,0,0),COLORYELLOW;DRAWTEXT_FIX(1,0.90,0,0,HYBLOCK),COLORFF00FF;线A1:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3;线A4:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;DRAWICON(CROSS(线A1,线A4),线A1,1);DRAWTEXT(CROSS(线A1,线A4),LOW*0.96,'破'),COLORYELLOW;V1:=EMA(CLOSE,5),COLOR00FFFF;V2:=EMA((EMA(CLOSE,29))*(1.01),10),COLORFF00FF;DRAWICON(CROSS(V1,V2),LOW,1),COLORYELLOW;DRAWTEXT(CROSS(V1,V2),LOW*0.98,'招'),COLORYELLOW;AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;BBF:MA(AAF,4),LINETHICK1,COLORYELLOW;TYP := (HIGH + LOW + CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;AAA:=(3*C+H+L+O)/6;VAR1A:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2A:=(HHV(VAR1A,5)+HHV(VAR1A,10)+HHV(VAR1A,20))/3;VAR3A:=(LLV(VAR1A,5)+LLV(VAR1A,10)+LLV(VAR1A,20))/3;VAR4A:=(HHV(VAR2A,5)+HHV(VAR2A,10)+HHV(VAR2A,20))/3;VAR5A:=(LLV(VAR3A,5)+LLV(VAR3A,10)+LLV(VAR3A,20))/3;VAR6A:=(LLV(VAR1A,2)+LLV(VAR1A,4)+LLV(VAR1A,6))/3;短线:VAR1A,COLORWHITE;中线:VAR6A,COLORYELLOW;下跌:IF(VAR1A=VAR6A,VAR6A, DRAWNULL),COLORGREEN;TJ1:= CCI1>差值4;立桩量:=FILTER(TJ1,0),NODRAW;TJ2:=IF(BARSLAST(立桩量)=1 ,1,0);STICKLINE(立桩量!=1,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;{STICKLINE(立桩量!=1,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}成立1:=TJ2=1;条件成立1:=FILTER(成立1,5);DRAWTEXT(条件成立1, REF(HIGH,BARSLAST(立桩量)),'看跌'),COLORLIBLUE; TJ11:= CCI1<-差值4 ;立桩量2:=FILTER(TJ11,0),NODRAW;TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,0);突破2:=TJ22=1;{STICKLINE(CLOSE AND 下跌!= VAR6A,REF(HIGH,BARSLAST(立桩量2)), REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}STICKLINE(CLOSE AND 下跌!= VAR6A,REF(LOW,BARSLAST(立桩量2)), REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;TJ:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(LOW,1),1,0);成立2:=TJ=1;条件成立2:=FILTER(成立2,5);DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),'看涨'),COLORLIMAGENTA;TJ111:=ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5);立桩量3:=FILTER(TJ111,3);TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));成立:=TJ3=1;条件成立:=FILTER(成立,5);DRAWTEXT(条件成立AND 下跌!= VAR6A,L*0.97,'☆成立');LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),BBF,'底背离'),COLORA6E500;DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLOR1880FF;X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),EMA8,'∠45'),COLORWHITE;STICKLINE(1,C,O,2.8,0),COLOR666600;STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;STICKLINE(1,C,O,0,0),COLORCCCCCC;成本2:(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLOR RED,LINETHICK2;。
通达信完美操盘主图指标公式明阳程序化
通达信完美操盘主图指标公式明阳程序化完美操盘:如图,该主图标明顶底,仓位,以及趋势多空带,另外还指示买入和卖出。
公式源码:1.回归斜率线A:=EMA(SLOPE(C,4)*20+C,42);2.经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;3.经典K:=SMA(经典RL,3,1);4.经典D:=SMA(经典K,3,1);5.经典J:=3*经典K-2*经典D;6.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))));7.MAHL2:=IF(EMA(C,2)>回归斜率线 A AND MAHL1>0,EMA(C,3),LLV(EMA((H+L)/2,5),30));{A}8.MAHL3:=IF(EMA(C,2)>回归斜率线 A AND MAHL1>0,LLV(EMA((H+L)/2,5),30),EMA(C,5));{A}9.回归斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线A,2),RGB(0,104,154));10.上线:=SMA(C,6.5,1);11.一号支撑线:SMA(C,14.5,1);12.上线1:=SMA(C,3,1);13.一号支撑线1:=SMA(C,8,1);14.上线2:=SMA(C,3.5,1);15.DRAWTEXT(CROSS(一号支撑线1,上线1),H*1.08,'压力'),COLOR00FF00;16.BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12) +MA(CLOSE,25))/4;17.UPR:=BBI+3*STD(BBI,13),LINETHICK2;18.DWN:=BBI-3*STD(BBI,13);19.安全:=MA(CLOSE,55),LINETHICK2;20.LC:=REF(CLOSE,1);21.RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;22.DRAWTEXT( CROSS(82,RSI) AND CLOSE<上线1 , HIGH*1.04,'压力线') ,COLORFF9966,LINETHICK2;23.A7:=(2*C+H+L)/4;24.操作:MA(A7,5),COLORBLUE,LINETHICK2;25.操作1:=MA(A7,5)*1.03,LINETHICK2;26.操作2:=MA(A7,5)*0.97,LINETHICK2;27.DRAWTEXT( CROSS(上线1,上线) AND 上线1>操作,LOW *0.92,'买进' ),COLORYELLOW;28.VAR1:LLV(A7,21);29.VAR2:HHV(A7,30);30.DRAWTEXT( CROSS(上线1,操作) AND 上线1<一号支撑线AND 上线1<一号支撑线1 AND 上线1<上线AND CLOSE>VAR1,LOW *0.98,'见底' ),COLORYELLOW;31.YCX:=操作>=REF(操作,1);32.H1:=MAX(MAX(上线,一号支撑线1),一号支撑线);33.L1:=MIN(MIN(上线,一号支撑线1),一号支撑线);34.DRAWTEXT(CROSS(上线1,一号支撑线1) AND 上线1>操作 ,LOW *0.98,'全仓' ),COLORYELLOW;35.SK:=EMA((A7-VAR1)/(VAR2-VAR1)*100,7);36.SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);37.M1:=1000*操作/一号支撑线<=1015 AND 1000*操作/一号支撑线>=975;38.M2:=1000*一号支撑线1/一号支撑线<=1020 AND 一号支撑线1/一号支撑线>=980;39.M3:=1000*上线/一号支撑线<=1015 AND 上线/一号支撑线>=985;40.DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/1 3>6/10 AND COUNT(SK>SD,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND OPEN>REF(CLOSE,1),1,0),LOW*0.94,'买进') ,COLORYELLOW;41.D:=MA(CLOSE,89)-MA(CLOSE,10)/3;42.DRAWTEXT(IF(CLOSEMA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW*0.88,'抄底'),COLORBROWN;43.RSV:=(CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100;44.K:=SMA(RSV,3,1);45.D1:=SMA(K,3,1);46.J:=3*K-2*D1;47.VAR3:=(2*CLOSE+HIGH+LOW)/3;{可将3该为4,信号少点}48.VAR4:=EMA(EMA(EMA(VAR3,4),4),4);{可将3该为4,信号少点}49.E:=(VAR4-REF(VAR4,1))/REF(VAR4,1)*100;50.F:=MA(E,3)+0.03;51.G:=MA(E,1);52.DRAWICON(CROSS(F,G) AND J>65,HIGH*1.02,15),COLORGREEN;53.DRAWICON(CROSS(G,F),LOW*0.9,9),COLORYELLOW;54.DRAWTEXT(CLOSE>OPEN AND H1VAR1 AND 上线1>一号支撑线 AND J<90,LOW *0.9,'主升' ),COLORRED;55.DRAWTEXT( CROSS(上线1,操作) AND M1 AND M2 AND M3,LOW *0.94,'买进' ),COLORYELLOW;56.DRAWTEXT(CLOSE>OPEN AND 上线>一号支撑线1 AND 一号支撑线1>一号支撑线AND CLOSE>MA(CLOSE,一号支撑线) AND 操作>=REF(CLOSE,操作) AND CROSS(上线1,操作) AND LOW>VAR1 AND J<90,LOW *0.9,'主升' ),COLORRED;57.DRAWTEXT(CLOSE>OPEN AND 操作>上线 AND 上线>一号支撑线1 AND 一号支撑线1>一号支撑线 AND CROSS(上线1,操作) AND LOW>VAR1 AND J<90,LOW *0.86,'回踩买进' ),COLORRED;58.DRAWTEXT(CLOSE>OPEN AND CROSS(上线,一号支撑线) AND LOW>VAR1 AND J<90,LOW *0.86,'回踩买进' ),COLORRED;59.STICKLINE(CLOSE>REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORRED;60.STICKLINE(CREF(C,1),C,O,3,0),COLORFFCC00;61.STICKLINE(CLOSE> REF(CLOSE,1) ANDC>O ,OPEN,CLOSE,3,0 ),COLOR000055;{红K};62.STICKLINE(CLOSE> REF(CLOSE,1) ANDC>O ,OPEN,CLOSE,2.7,0 ),COLOR000077;{红K};63.STICKLINE(CLOSE> REF(CLOSE,1) ANDC>O ,OPEN,CLOSE,2.1,0 ),COLOR000099;64.STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;66.STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;67.STICKLINE(CLOSE=REF(CLOSE,1) ,H,L,3,1 ),COLOR999999;68.STICKLINE(CLOSE=REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORWHITE;69.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;70.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;71.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;72.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;73.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;74.STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;75.STICKLINE(CLOSE<REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;76.STICKLINE(C<REF(C,1) ANDC>O,C,O,3,0),COLORFFCC00;77.STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,3,0 ),COLOR990000;78.STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,2.7,0 ),COLORCC0000;79.STICKLINE(CLOSE<REF(C,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;REF(C,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;81.STICKLINE(CLOSE<REF(C,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;82.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,3.2,0),COLORBB00FF;83.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,2.7,0),COLORFF33FF;84.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,2.1,0), COLORFF66FF;85.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,1.5,0),COLORFF99FF;86.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,0.9,0),COLORFFBBFF;87.STICKLINE(CROSS(J,D1) AND J<70,CLOSE,OPEN,0.3,0),COLORFFDDFF;。
顶底买卖主图指标(通达信)此指标是我精心收藏的指标,无未来函数,真正的好指标
顶底买卖主图指标(通达信)此指标是我精心收藏的指标,无未来函数,真正的好指标顶底买卖指标(通达信) 此指标是我精心收藏的指标,无未来函数,真正的好指标VAR1:=LLV(LOW,10);VAR2:=HHV(HIGH,25);操盘线: EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,4),COLORRED;绝底:0.3,LINETHICK2,COLOR0000FF;短底:1,LINETHICK2,COLORBLUE;短顶:3,COLORGREEN;绝顶:3.5,LINETHICK2,COLORFF00FF;分界:2,COLOR00FFFF;DRAWICON(CROSS(绝底,操盘线),0.3,5);DRAWTEXT(CROSS(操盘线,短底),1,'注意');DRAWTEXT(CROSS(短顶,操盘线),3.1,'注意');DRAWICON(CROSS(绝顶,操盘线),3.8,6);DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COL ORYELLOW;DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF;DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR 0080FF;DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),CO LORYELLOW;DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA;DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000 )),COLORMAGENTA;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,(AMOUNT/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)),COLORYELLO W;。
通达信顶底分型主图指标公式
通达信顶底分型主图指标公式重心线:(H+L+O+C*3)/6;NX:=(3*CLOSE+LOW+OPEN+HIGH)/6;牛线:(20*NX+19*REF(NX,1)+18*REF(NX,2)+17*REF(NX,3)+16*REF( NX,4)+15*REF(NX,5)+14*REF(NX,6)+13*REF(NX,7)+12*REF(NX,8) +11*REF(NX,9)+10*REF(NX,10)+9*REF(NX,11)+8*REF(NX,12)+7*REF(NX,13 )+6*REF(NX,14)+5*REF(NX,15)+4*REF(NX,16)+3*REF(NX,17)+2*REF(NX,18)+REF(NX,20))/210;牛熊线:MA(牛线,6),COLORGREEN,LINETHICK2;顶:=BBI+3*STD(BBI,13),COLOR004AFF;底:=BBI-3*STD(BBI,13),COLOR67FF00;KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0ANDKU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0ANDKD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1);LV:=L<DL AND L<REF(L,1);GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HHV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));V00:=HIGH<REF(HIGH,1) AND LOW<REF(LOW,1);V01:=HIGH<REF(HIGH,1) AND LOW>REF(LOW,1);V02:=HIGH>REF(HIGH,1) AND LOW<REF(LOW,1);V03:=HIGH>REF(HIGH,1) AND LOW>REF(LOW,1);V04:=REF(HIGH,2)<HIGH AND REF(LOW,2)<LOWAND REF(HIGH,2)>REF(HIGH,1) AND REF(LOW,2)<REF(LOW,1);V1:=COUNT(V00,6)>=3 AND COUNT(V01 OR V02,5)=0 AND LLVBARS(LOW,6)=1 AND HHVBARS(HIGH,6)>=5 AND V03;V2:=COUNT(V00,7)>=3 AND COUNT(V01 OR V02,6)=1 AND LLVBARS(LOW,7)=2 AND HHVBARS(HIGH,7)>=6 AND V04;V3:=COUNT(V00,7)>=3 AND COUNT(V01 OR V02,6)=1 AND LLVBARS(LOW,7)=1 AND HHVBARS(HIGH,7)>=6 AND V03;V4:=COUNT(V00,8)>=3 AND COUNT(V01 OR V02,7)<=2 AND LLVBARS(LOW,8)=2 AND HHVBARS(HIGH,8)>=7 AND V04;V5:=COUNT(V00,8)>=3 AND COUNT(V01 OR V02,7)<=2 AND LLVBARS(LOW,8)=1 AND HHVBARS(HIGH,8)>=7 AND V03;V6:=COUNT(V00,9)>=3 AND COUNT(V01 OR V02,8)<=3 AND LLVBARS(LOW,9)=2 AND HHVBARS(HIGH,9)>=8 AND V04;V7:=COUNT(V00,9)>=3 AND COUNT(V01 OR V02,8)<=3 AND LLVBARS(LOW,9)=1 AND HHVBARS(HIGH,9)>=8 AND V03;V8:=COUNT(V00,10)>=3 AND COUNT(V01 OR V02,9)<=4AND LLVBARS(LOW,10)=2 AND HHVBARS(HIGH,10)>=9 AND V04;V9:=COUNT(V00,10)>=3 AND COUNT(V01 OR V02,9)<=4 AND LLVBARS(LOW,10)=1 AND HHVBARS(HIGH,10)>=9 AND V03;V10:=COUNT(V00,11)>=3 AND COUNT(V01 OR V02,10)<=5 AND LLVBARS(LOW,11)=2 AND HHVBARS(HIGH,11)>=10 AND V04;XG:=V1 OR V2 OR V3 OR V4 OR V5 OR V6 OR V7 OR V8 OR V9 OR V10;HV00:=HIGH>REF(HIGH,1) AND LOW>REF(LOW,1);HV01:=HIGH<REF(HIGH,1) AND LOW>REF(LOW,1);HV02:=HIGH>REF(HIGH,1) AND LOW<REF(LOW,1);HV03:=HIGH<REF(HIGH,1) AND LOW<REF(LOW,1);HV04:=REF(HIGH,2)>HIGH AND REF(LOW,2)>LOW AND REF(HIGH,2)>REF(HIGH,1) AND REF(LOW,2)<REF(LOW,1);HV1:=COUNT(HV00,6)>=3 AND COUNT(HV01 OR HV02,5)=0 AND HHVBARS(HIGH,6)=1 AND LLVBARS(LOW,6)>=5 AND HV03;HV2:=COUNT(HV00,7)>=3 AND COUNT(HV01 OR HV02,6)=1 AND HHVBARS(HIGH,7)=2 AND LLVBARS(LOW,7)>=6 AND HV04;HV3:=COUNT(HV00,7)>=3 AND COUNT(HV01 OR HV02,6)=1 AND HHVBARS(HIGH,7)=1 AND LLVBARS(LOW,7)>=6 AND HV03;HV4:=COUNT(HV00,8)>=3 AND COUNT(HV01 OR HV02,7)<=2 AND HHVBARS(HIGH,8)=2 AND LLVBARS(LOW,8)>=7 AND HV04;HV5:=COUNT(HV00,8)>=3 AND COUNT(HV01 OR HV02,7)<=2 AND HHVBARS(HIGH,8)=1 ANDLLVBARS(LOW,8)>=7 AND HV03;HV6:=COUNT(HV00,9)>=3 AND COUNT(HV01 OR HV02,8)<=3 AND HHVBARS(HIGH,9)=2 AND LLVBARS(LOW,9)>=8 AND HV04;HV7:=COUNT(HV00,9)>=3 AND COUNT(HV01 OR HV02,8)<=3 AND HHVBARS(HIGH,9)=1 AND LLVBARS(LOW,9)>=8 AND HV03;HV8:=COUNT(HV00,10)>=3 AND COUNT(HV01 OR HV02,9)<=4 AND HHVBARS(HIGH,10)=2 AND LLVBARS(LOW,10)>=9 AND HV04;HV9:=COUNT(HV00,10)>=3 AND COUNT(HV01 OR HV02,9)<=4 AND HHVBARS(HIGH,10)=1 AND LLVBARS(LOW,10)>=9 AND HV03;HV10:=COUNT(HV00,11)>=3 AND COUNT(HV01 OR HV02,10)<=5 AND HHVBARS(HIGH,11)=2 AND LLVBARS(LOW,11)>=10 AND HV04;HXG:=HV1 OR HV2 OR HV3 OR HV4 OR HV5 OR HV6 OR HV7 OR HV8 OR HV9 OR HV10;底分型:FILTER(XG=1,5) AND 重心线<10.5 AND 牛线<12 AND 牛熊线<10.2,COLORYELLOW,NODRAW;顶分型:FILTER(HXG=1,3),NODRAW;DRAWBAND(BBI,RGB(97,95,00),顶,RGB(97,95,00));DRAWBAND(BBI,RGB(25,75,150),底,RGB(25,75,250));DRAWTEXT_FIX(1,0.02,0,0,'☆微信公众号:({更多指标关注微信公众号:爱指标源码}) ☆'),COLORRED;{用DRAWLINE函数(属于未来函数)绘制直线段,不喜欢的可以删除下面两句公式}DRAWLINE(LV1,LOW,HHV1,HIGH,0),COLORYELLOW,LINETHI CK2;DRAWLINE(HHV1,HIGH,LV1,LOW,0),COLORMAGENTA,LINETHICK2;STICKLINE(CLOSE>REF(CLOSE,1),HIGH,LOW,0,1),COLORRED;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR00 0055;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR 000077;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR 000099;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR 0000BB;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR 0000DD;STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR 0000FF;STICKLINE(CLOSE=REF(CLOSE,1),HIGH,LOW,0,1),COLORWHI TE;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR55 5555;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR 777777;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR 999999;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR BBBBBB;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR DDDDDD;STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORF FFFFF;STICKLINE(CLOSE<REF(CLOSE,1),HIGH,LOW,0,1),COLORCYA N;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR99 0000;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR CC0000;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLORF F4400;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORF F8800;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORF FCC00;STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR CYAN;DRAWTEXT(FILTER(XG=1,5) AND 重心线<10.5 AND 牛线<12 AND 牛熊线<10.2,L*0.97,'底分型'),COLORYELLOW;DRAWTEXT(FILTER(HXG=1,3),H*1.02,'顶分型');。
通达信指标公式源码缠论主神优化主图指标
NAA:=10;{源码120.调整时间长短。
最底10、21;}TA:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-L OW));ATR:=EMA(TA,5);{筹码峰高度调整线,源码181。
参数最低21.如果抓大牛把参数加大。
}VAR81:=REF(CLOSE,NAA)-REF(ATR,1);仙界线:=HHV(VAR81,5),COLORYELLOW;{筹码峰高度调整线,最低21.源码181}上:=(1+1/100)*仙界线;下:=(1-1/100)*仙界线;{上:=(1+7/100)*仙界线;下:=(1-7/100)*仙界线;中:=(上+下)/2;}XGD:DRAWBAND(上,RGB(258,88,0),下,RGB(258,88,0));{颜色亮度};{箱体}TC1S:=IF(H=HHV(H,48),H,DRAWNULL);TC2S:=CONST(BARSLAST(TC1S=H))+1;UPPERS:=CONST(IF(TC2S=1,H,REF(H,TC2S-1)));BC1S:=IF(L=LLV(L,48),L,DRAWNULL);BC2S:=CONST(BARSLAST(BC1S=L))+1;LOWERS:=CONST(IF(BC2S=1,L,REF(L,BC2S-1)));LPS:=CURRBARSCOUNT<=BC2S AND L=LOWERS;HPS:=CURRBARSCOUNT<=TC2S AND H=UPPERS;AB1S:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);BA1S:=EMA(AB1S,5);上轨:=REFDATE(REF(HHV(MAX(C,O),96),5),DATE);下轨:=REFDATE(REF(LLV(MIN(C,O),96),5),DATE);中轨:=((上轨)+(下轨))/2;YXHX:=DATE>=REF(DATE,BARSLAST(IF(BC2S>TC2S,LPS,HPS)));上沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,上轨,上轨),COLOR555555,LINETHICK2;中枢:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,中轨,中轨),COLOR555555,LINETHICK2;下沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,下轨,下轨),COLOR555555,LINETHICK2;{三K线}三K线:=IF(三K线,1,DRAWNULL);DG:=MAX(MAX(REFX(L,1),REFX(L,2)),REFX(L,3));GD:=MIN(MIN(REFX(H,1),REFX(H,2)),REFX(H,3));AA11:=(DG+GD)/2;A11:=AA11>REFX(L,3) AND REFX(L,2)< AA11 AND REFX(L,1) <AA11 ;A21:=FILTER(A11,BARSLAST(A11)+2);A41:=A11 AND A21;A51:=IF(REF(A41,1),H,0),NODRAW;STICKLINE(三K线=1 &&REF(A41,2),REF(GD,2),REF(DG,2),13,-1),COLORMAGENTA; DRAWKLINE(H,O,L,C);{峰谷}峰谷:=IF(峰谷,1,DRAWNULL);PA:=10;PB:=REF(HIGH,PA)=HHV(HIGH,2*PA+1);PC:=FILTER(PB,PA);PD:=BACKSET(PC,PA+1);PE:=FILTER(PD,PA);{高点}峰线:(REF(HIGH,BARSLAST(PE)))*峰谷,COLORRED,POINTDOT,LINETHICK2; AA21:=REF(LOW,PA)=LLV(LOW,2*PA+1);BB21:=FILTER(AA21,PA);CC21:=BACKSET(BB21,PA+1);DD21:=FILTER(CC21,PA);{低点}谷线:(REF(LOW,BARSLAST(DD21)))*峰谷,COLORGREEN,POINTDOT,LINETHICK2;{三角形中枢}时间:=4;A:=H=HHV(H,时间*5) AND HHV(H,时间*5)>REF(HHV(H,时间*5),1);B:=L=LLV(L,时间*5) AND LLV(L,时间*5)<REF(LLV(L,时间*5),1);CCA:DRAWLINE(A,H,B,L,0),COLORGREEN,LINETHICK2;CCB:DRAWLINE(B,L,A,H,0),COLORRED,LINETHICK2;N:=(0,1,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) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留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,COLORLIMAGENTA;C1:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORMAGENTA;C2:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORWHITE;DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'买'),LINETHICK2,COLORRED;{均线}{MA1:EMA(C,M1),LINETHICK2,COLORWHITE;MA2:EMA(C,M2),LINETHICK2,COLORYELLOW;MA3:EMA(C,M3),LINETHICK2,COLORRED;}MC:=100;NN:=0.4;MIDZ:MA(CLOSE,MC),COLORWHITE,LINETHICK3;AN:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);A1:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;A15D:IF(K2!=2, AN-(A1-AN*0.977),DRAWNULL),COLORBLUE,LINETHICK3; M5:=MA(C,3),COLORRED,LINETHICK3;{11、变色下插线}B55:=ATAN((A15D/REF(A15D,1)-1)*100)*180/3.1416;IF(55>30 AND A15D>REF(A15D,1),A15D,DRAWNULL),COLORCYAN,LINETHICK3;B100:=ATAN((M5/REF(M5,1)-1)*100)*180/3.1416;IF(B55<0 AND A15D<REF(A15D,1),A15D,DRAWNULL),COLORRED,LINETHICK3;{12、黄色起飞跑道};{13、飓风眼启爆,K线下方蓝色柱,股价启动信号,无函数}AHC1:=CLOSE*VOL;AHC2:=EMA((EXPMA(AHC1,2)/EXPMA(VOL,2)+EXPMA(AHC1,5)/EXPMA(VOL,5 )+EXPMA(AHC1,10)/EXPMA(VOL,10)+EXPMA(AHC1,20)/EXPMA(VOL,20))/4,10),COLOR YELLOW;风向R:=1.06*AHC2,LINETHICK2,COLORWHITE;吹:=1.13*AHC2,LINETHICK2,COLORWHITE;ZT:=REF(C,1)*1.1-C<0.01 AND H=C;飓风:=CROSS(C,风向R) AND ZT;STICKLINE(飓风,L*0.98,L*0.80,2,0),COLORBLUE;OUT1:=CROSS(M5,A15D);DRAWICON(OUT1,L*1.02,13);{红球};。
通达信极限顶底主图指标公式
通达信极限顶底主图指标公式T :=1;VARX:=((T * (CLOSE - LLV(LOW,27))) / (HHV(HIGH,27) - LLV(LOW,27))) * 100;VARX1:=SMA(VARX,3,1);VARX2:=Sma(VARX1,3,1);VARX3:=REF(LOW,1);VARX4:=((SMA(Abs(LOW - VARX3),3,1)) / (SMA(MAX(LOW - VARX3,0),3,1))) * 100;VARX5:=EMA(IF(CLOSE * 1.2,VARX4 * 10,VARX4 / 10),3);VARX6:=LLV(LOW,30);多空分水岭 : MA(C,17),COLOR4080FF,LINETHICK2;EMA(HHV(C,33),2),COLORGRAY,LINETHICK3;EMA(LLV(C,33),2),COLORGRAY,LINETHICK3;DS:=mfi.MFI;A9:=DATETODAY(DATE);VARX7:=HHV(VARX5,30);VARX8:=IF(LLV(LOW,58),1,0);筹码短期:=DMA(((((3 * HIGH) + LOW) + OPEN) + (2 * CLOSE)) / 7,vol / ((SUM(AMOUNT,8) / ((AMOUNT / VOL) / 100)) / 100));筹码中期:=DMA(((((3 * HIGH) + LOW) + OPEN) + (2 * CLOSE)) / 7,VOL / ((SUM(AMOUNT,13) / ((AMOUNT / VOL) / 100)) / 100));筹码长期:=DMA(((((3 * HIGH) + LOW) + OPEN) + (2 * CLOSE)) / 7,VOL / ((SUM(AMOUNT,20) / ((AMOUNT / VOL) / 100)) / 100));DIF:=EMA(EMA(CLOSE,18) - EMA(CLOSE,34),11);macd:=EMA(EMA(DIF,11),11);DS1:=IF(A9>8022,0.0122,-1 * DS);DS2:=IF(A9>7422,4.58,-1 * DS);DEF:=2 * (DIF - MacD);mms:=(100 * EMA(EMA(mtm.MTM,6),6)) / EMA(EMA(ABS(MTM.MTM),6),6);MMM:=(100 * EMA(EMA(MTM.MTM,12),12)) / EMA(EMA(ABS(MTM.MTM),12),12);MML:=(100 * EMA(EMA(MTM.MTM,26),26)) / EMA(EMA(ABS(MTM.MTM),26),26);AJ2:=(A9>146) AND (A9<200);AI2:=(A9>696) AND (A9<750);AH2:=(A9>1315) AND (A9<1365);AA2:=(A9>1854) AND (A9<1904);AL2:=(A9>3068) AND (A9<3118);AK2:=(A9>4709) AND (A9<4759);AB2:=(A9>5280) AND (A9<5320);AC2:=(A9>6520) AND (A9<6570);VARR1:=((T * (HHV(HIGH,24) - CLOSE)) / (HHV(HIGH,24) - LLV(LOW,24))) * 100;VARR2:=((CLOSE - LLV(LOW,18)) / (HHV(HIGH,18) - LLV(LOW,18))) * 100;VARR3:=(((2 * CLOSE) + HIGH) + LOW) / 4;VARR4:=LLV(LOW,26);VARR5:=HHV(HIGH,34);VARR6:=T * (EMA(((VARR3 - VARR4) / (VARR5 - VARR4)) * 100,16));VARR7:=SMA(SMA(VARR2,3,1) + 3,3,1);VARR8:=EMA(VARR6,7);AE2:=(A9>6828) AND (A9<6878);AF2:=(A9>7132) AND (A9<7182);AG2:=(A9>7341) AND (A9<7391);AX2:=(A9>8014) AND (A9<8549);VARR9:=SMA(VARR1,3,1);AH1:=(A9>786) AND (A9<826);AI1:=(A9>520) AND (A9<570);AG1:=(A9>1360) AND (A9<1410);AL1:=(A9>2333) AND (A9<2383);AA1:=(A9>3826) AND (A9<3876);AK1:=(A9>4856) AND (A9<4906);AB1:=(A9>6142) AND (A9<6192);VARR10:=((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100;VARR11:=((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100;VARR12:=((CLOSE - MA(CLOSE,32)) / MA(CLOSE,32)) * 100;VARR13:=((VARR10 + VARR11) + VARR12) / 3;VARR14:=IF(VARR13 <= -20,10,0);VARR15:=HHV(VARR14,10);VARR24:=LLV(LOW,36);VARR25:=HHV(HIGH,30);VARR26:=(EMA(((CLOSE - VARR24) / (VARR25 - VARR24)) * 4,4)) * 25;VARB27:=(((((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100) / 2) + 22) * 1;VARB28:=((CLOSE - ((EMA(AMOUNT,13) / EMA(VOL,13)) / 100)) / ((EMA(AMOUNT,13) / EMA(VOL,13)) / 100)) * 100;AC1:=(A9>6802) AND (A9<6852);AE1:=(A9>6912) AND (A9<6962);AF1:=(A9>7264) AND (A9<7304);AX1:=(A9>7422) AND (A9<7499);个股:=5 * (POW(SMA((C - LLV(L,65)) / (HHV(H,65) - LLV(L,65)),6,1),2));Y1:=IF(A9<7422,(0.5 * ((((((((((AA1 + AB1) + AC1) + AE1) + AF1) + AG1) + AH1) + AI1) + AK1) + AL1) + AX1)) * 14,DS2);Y2:=IF(A9<8022,0.5 * (((((((((((AA2 + AH2) + AB2) + AC2) +AE2) + AF2) + AG2) + AI2) + AJ2) + AK2) + AL2) + AX2),DS1);Y3:=T * crOSS(Y2,个股);Y4:=(T * CROSS(Y1,个股)) AND (个股>0.6);DRAWICON(Y3,L * 0.97,26);DRAWICON(Y4,H * 1.03,9);DRAWKLINE(H,O,L,C);。
通达信指标公式源码顶底趋势主图画线指标
顶底趋势主图画线指标N:=3;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);{前二高}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。
通达信 顶底 公式
通达信顶底公式
通达信顶底公式主要基于缠论的顶分型和底分型公式编写,以下是具体的编写方法和解释:
1. 顶分型公式编写方法与底分型类似,只需稍作改动即可。
2. 顶底分型主图公式(处理了包含关系)。
UP表示上升K线,T表示上升K线形成后的区间周期数T,HL和HH分别为区间的最高的最低价和最高的最高价。
DING表示当天最低价小于HL并且最高价小于HH,DINGFX 表示当天最低价小于HL并且最高价小于HH,并且是区间第一次,形成顶分型。
3. 满足顶分型画黄色K线。
4. 满足顶分型写文字。
此外,还有波段顶底指标公式,主要借鉴了KDJ指标的思路,短期超卖和中期超卖共振,画黄色柱线。
以上信息仅供参考,建议咨询专业人士获取具体公式的编写方法。
顶底KDJ通达信指标公式源码
顶底KDJ通达信指标公式源码
KDJ指标是一种常用的技术分析指标,用于衡量股票或其他金融资产的超买超卖情况。
顶底KDJ通达信指标公式源码是一份用于在通达信软件中计算KDJ指标的源代码。
以下是顶底KDJ通达信指标公式的源码:
公式名称:顶底KDJ通达信指标公式源码
定义变量
n = 9
m1 = 3
m2 = 3
计算RSV
HHV(HIGH, n)
LLV(LOW, n)
RSV = (CLOSE - LLV(LOW, n)) / (HHV(HIGH, n) - LLV(LOW, n)) * 100
计算K值
EMA(RSV, m1)
K = EMA(RSV, m1)
计算D值
EMA(K, m2)
D = EMA(K, m2)
计算J值
J = 3 * K - 2 * D
输出结果
K, D, J
以上代码是使用通达信软件自带的公式语言编写的顶底KDJ
指标计算代码。
其中,n代表周期数,m1代表K值的平滑参数,
m2代表D值的平滑参数。
代码通过计算最高价和最低价的最高值
和最低值,以及收盘价与最低价之差与最高价和最低价之差的比例,
来计算RSV值。
然后,通过对RSV值进行指数移动平均计算,得
到K值和D值。
最后,通过线性组合计算出J值。
请注意,以上代码仅用于演示目的,实际使用时可能需要针对
具体需求进行修改和调整。
此外,建议在使用之前先对代码进行验
证和测试,以确保计算结果的准确性。
希望以上信息对您有所帮助!如有任何问题,请随时与我联系。
通达信缠论高低点主图指标公式(4)
通达信缠论高低点主图指标公式(4)高保留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)低保留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 LAAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW;局部天数:BARSLAST(ABS(极点保留)),NODRAW;局部换手:IF(极点保留=0,SUM('HSL.HSL',局部天数),0),NODRAW;局部涨跌:C/REF(C,局部天数)*100-100,NODRAW,COLORWHITE;换手G:=VARCAT(VAR2STR(SUM('HSL.HSL',BARSLAST(高保留X)),2),'%H ');高点换手:=VARCAT(VARCAT(VARCAT(换手G,'('),VAR2STR(BARSLAST(高保留X),0)),'T)'); 南方财富网微信号:southmoney。
通达信顶底趋势主图指标公式
A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F;DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B;DRAWNUMBER(S1,H*1.02,H),COLORCFB53B;DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。