【股票指标公式下载】-【通达信】顶底主图(攻击线、操盘线、生命线)
通达信底顶指标公式
通达信底顶指标公式以下是通达信底顶指标的公式和解释: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日均线的两倍。
通达信缠论中枢画线主图指标公式
通达信缠论中枢画线主图指标公式N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF( BARSLAST(TJ4),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLO RLIRED;中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLO RLIGREEN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLO RRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLO RGREEN;}趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选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);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);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;DD1:=BARSLAST(ABS(极点保留)!=1);DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;STICKLINE(极点保留=1,局部极点,局部极点,30,1),COLORCYAN;DRAWNUMBER(极点保留=1,局部极点,局部极点)COLORCYAN;DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;STICKLINE(极点保留=-1,局部极点,局部极点,30,1),COLORRED;DRAWNUMBER(极点保留=-1,局部极点,局部极点)COLORRED;MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHI CK2;。
【股票指标公式下载】-【通达信】兄弟操盘(五日乖离率、动力线、牛熊线、生命线)
【通达信】兄弟操盘(五日乖离率、动力线、牛熊线、生命线)-指标公式源码动力线:MA(C,5),LINETHICK3,COLOR00CCFF;牛熊线:MA(C,13),CIRCLEDOT,COLORYELLOW;生命线:MA(C,34),CIRCLEDOT,COLORMAGENTA;MA05:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);五日乖离率:=(C-MA05)/MA05*100;BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB05>30 AND MA05>REF(MA05,1), MA05,DRAWNULL),LINETHICK3,COLORRED; BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB05<0 AND MA05<REF(MA05,1), MA05,DRAWNULL),LINETHICK3,COLORGREEN; 三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;VAR1:=(MA20-MA30)>REF((MA20-MA30),1) AND MA20>REF(MA20,1) ANDMA30>REF(MA30,1);VAR2:=(MA30-MA20)<REF((MA30-MA20),1) AND MA20<REF(MA20,1) ANDMA30<REF(MA30,1);BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA05>REF(MA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>MA30 OR O>MA30) AND MA05<REF(MA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10<REF(MA10,1),10);DRAWTEXT(加仓 ,LOW*0.98,'◆加二'),COLORYELLOW;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10>REF(MA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA05>REF(MA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30; 买入:=FILTER(MR,10);DRAWTEXT(减仓,HIGH*1.02,'◆风险'),COLORCYAN;DRAWTEXT(买入,LOW*0.96,'◆买二'),COLORYELLOW;DRAWTEXT(清仓 ,HIGH*1.00,'◆清仓'),COLORGREEN;VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;{彩色K线}TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);TYX4:=MA((C+L+O+H)/4,13);TYX5:=EMA((C+L+O+H)/4,21);{空心红}STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;{深绿}STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;{蓝}STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;{黄}STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;{粉红}STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;{亮灰}STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;{深红}STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;{涨跌停K线}STICKLINE(HIGH=LOW AND CLOSE=OPEN AND(CLOSE/REF(CLOSE,1))>1.048,HIGH,LOW,3,0) ,COLORRED;STICKLINE(HIGH=LOW AND CLOSE=OPEN AND(REF(CLOSE,1)/CLOSE)>1.048,HIGH,LOW,3,0) ,COLOR00FF00;{突破}STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 ANDC>O,C,O,1,0),COLOR00CCFF;{买卖主图}MA18:=MA(CLOSE,18);MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);买:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)); DRAWTEXT(FILTER(买=1,5),LOW,'★买一'),COLORRED;加1:=MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18);DRAWTEXT(加1,LOW*0.99,'★加一'),COLORCC66FF;卖一:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX); DRAWTEXT(FILTER(卖一=1,1),HIGH*1.01,'★卖一'),COLORGREEN;{牛熊通吃}AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;DRAWTEXT(FF1,LOW*0.99,'老鼠仓'),COLOR4080FF;{预测明天}XXS:=MA(LOW,5)*(1-5/100);XXS1:=MA(HIGH,5)*(1+5/100);均线:=C,COLORGREEN;AAAA:=CLOSE/REF(CLOSE,3)<=0.85 AND CROSS(C,XXS) ANDC>REF(C,1),LINETHICK0 ;DRAWTEXT(AAAA,L*0.95,'下影买'),COLORRED;BBAA:=CROSS(XXS1,C);DRAWTEXT(CROSS(XXS1,C),H,'开盘逃'),COLORWHITE;DDDD:=CROSS(C,XXS1);DRAWTEXT(DDDD,H,'明日走'),COLORYELLOW;{兄弟指标}AAA:=MA(LOW,5)*(1-5/100);BBB:=(HHV(AAA,5)+LLV(AAA,5))/2;DRAWTEXT(CROSS(BBB,L) AND BBB>REF(BBB,1),L*0.98,'←兄弟回马枪'),COLORWHITE;{天河指标}DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);DRAWTEXT(REF(CROSS(DEA,DIF),1) AND CROSS(DIF,DEA),L*0.97,'←天河回马抢'),COLORMAGENTA;{见好就收}VSR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VSR3:=SMA(VSR2,4,1);VSR4:=SMA(VSR3,2,1);DRAWTEXT(VSR4>82 AND VSR3>89,HHV(C,30)*1.02,'收'),COLORGREEN;【通达信】兄弟操盘(五日乖离率、动力线、牛熊线、生命线)-指标公式效果图(文档来源:若水财经社区)。
通达信指标公式源码顶底先知 主图指标 源码
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;。
通达信均线顶底指标公式
通达信均线顶底指标公式V AR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2); V AR2:=REF(V AR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR3:=REF(V AR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR4:=REF(V AR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR6:=REF(V AR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR7:=REF(V AR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR8:=REF(V AR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(V AR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V ARB:=REF(V ARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V ARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); STICKLINE(V AR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1} V ARD:=CLOSE<REF(CLOSE,1) CLOSE AND V ARE:="REF(VARD,1)" CLOSE=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V ARF:=REF(V ARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR10:=REF(V ARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR11:=REF(V AR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR12:=REF(V AR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR13:=REF(V AR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR14:=REF(V AR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR15:=REF(V AR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR16:=REF(V AR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); V AR17:=REF(V AR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); V AR18:=REF(V AR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); STICKLINE(V ARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR V AR16 OR V AR17 OR V AR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66; V AR19:=REF(V ARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,1) AND V AR1; STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;V AR1A:=REF(VAR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,1) AND V ARD; STICKLINE(V AR1A,REF(CLOSE,1),REF(CLOSE,2),4,2),COLOR00FF00{98FD}; STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORRED;{黄托底} STICKLINE(V AR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;STICKLINE(V AR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;{蓝压顶} STICKLINE(V AR1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;PMA:MA(C,5),COLORWHITE,LINETHICK2;IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2; A:="(PMA" IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2; DD:="多空线多空线); IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;。
【炒股必下载的公式】通达信顶底分型线段缠论主图指标公式
通达信顶底分型线段缠论主图指标公式局部低点预选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)COLORBLUE;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE;DRAWICON(极点保留=-1,L-0.03,1);DRAWICON(极点保留=1,H+0.03,2);。
顶底通达信指标公式源码
顶底通达信指标公式源码比较器收阳指标M1:=EMA(C,12);M2:=EMA(C,26);当M1>M2ANDC>M1ANDC>OTHENB1:POINTDOT,COLORRED;当M1<M2ANDC<M1ANDC<OTHENB2:POINTDOT,COLORGREEN;多头趋势指标九M1:=EMA(C,13);M2:=EMA(M1,13);M3:=EMA(M2,13);M4:=EMA(M3,13);M5:=EMA(M4,13);M6:=EMA(M5,13);M7:=EMA(M6,13);M8:=EMA(M7,13);M9:=EMA(M8,13);AA:=(M1+M2+M3+M4+M5+M6+M7+M8+M9)/9;BB:=AA*2-M9;当C>BBANDC>REF(BB,1)THENDRAWLINE(BB,BB+0.02,AA,AA+0.02,0),COLORMAG ENTA;多空指标M1分别:=EMA(C,13);M2分别:=EMA(C,21);M3分别:=EMA(C,34);多空:=(M1分别>M2分别ANDM2分别>M3分别)*2+(-1)*(M1分别<M2分别ANDM2分别<M3分别);多空指标:SUM(多空,2),COLORMAGENTA,LINETHICK2;当多空指标>1ANDC>OTHENDRAWTEXT(2,H,'多头'),COLORRED;当多空指标<-1ANDC<OTHENDRAWTEXT(2,L,'空头'),COLORYELLOW;震荡指标M1:=EMA(C,15);M2:=EMA(C,35);短震荡:=M1-M2;MA1:=EMA(短震荡,5);MA2:=EMA(短震荡,10);MA3:=EMA(短震荡,30);DRAWTEXT(短震荡>MA1AND短震荡>MA2AND短震荡>MA3ANDC>O,H*1.03,'多头震荡'),COLORRED;DRAWTEXT(短震荡<MA1AND短震荡<MA2AND短震荡<MA3ANDC<O,L*0.97,'空头震荡'),COLORGREEN;极限指标N1:=REF(C,1);N2:=REF(C,2);N3:=REF(C,3);N4:=REF(C,4);N5:=REF(C,5);N6:=REF(C,6);极限:=(N1-N2)+(N2-N3)+(N3-N4)+(N4-N5)+(N5-N6);极限:=(极限/2)*(N1-N6);极限指标:=EMA(极限,4);。
通达信顶底分型主图指标公式
通达信顶底分型主图指标公式重心线:(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,'顶分型');。
通达信极限顶底主图指标公式
通达信极限顶底主图指标公式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;。
【股票指标公式下载】-【通达信】主力动向(分时、MACD定位顶底、MACD趋势)
【股票指标公式下载】-【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)-指标公式源码{-------------------------通达信新分时源码深度优化版--------------------}A:=CURRBARSCOUNT;A1:=DAY!=REF(DAY,1);A2:=BARSLAST(A1)+1;A3:=MA(C,A2);A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;A5:=IF(CAPITAL>0,A4,A3);均价线:=IF(A<=CONST(A2),A5,DRAWNULL);分钟有效周期:=IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,DRAW NULL))));分时价:=TFILT(CLOSE,CURRBARSCOUNT,00,CURRBARSCOUNT,00);分时判断:=IF(分时价=DRAWNULL,1,IF(分钟有效周期=DRAWNULL,DRAWNULL,1)); {-----------------------------由MACD定位顶底-------------------------------}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);KX:=BARSSINCE(CLOSE);{←⾸次开盘价距⾦的天数}HHN:=CONST(HHV(DIFF,KX));HLN:=CONST(LLV(DEA,KX));RC1:=CONST((HHN+HLN)/2);SS:=((HHN-HLN)/200);MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;MACD中轴:=0+-(-100*SS+RC1);DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;MACD修正:=2*(DIFF修正-DEA修正)+MACD中轴,COLOR0000BB,NODRAW;MACD超跌:=CONST(LLV(MACD修正,KX));MACD超跌线:=IF(MACD超跌{----------------------利⽤MACD趋势进⾏精确顶底判断------------------------}顶部:=MACD顶部+-MACD超跌线;天际:=顶部*0.809;中轴:=MACD中轴+-MACD超跌线;海⾯:=顶部*0.191;底部:=MACD底部;{------------------------传统KDJ指标结合MACD优化---------------------------}RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*顶部;{采⽤21⽇⽉线优化}K:SMA(RSVA,3,1),COLORFFFFFF,NODRAW;D:SMA(K,3,1),COLOR00FFFF,NODRAW;原J值参数:=3*K-2*D;JD:=IF(原J值参数<底部,底部,原J值参数);{J值底部钝化处理}J:IF(JD>顶部,顶部,JD),COLORFF00FF,NODRAW;{底部钝化处理后再进⾏顶部钝化处理}{---------------------------MACD多空量能判断-------------------------------}MACD多头:DIFF修正+-MACD超跌线,COLOR339999;空头:DEA修正+-MACD超跌线,COLOR00FF00;量能柱:2*(MACD多头-空头)+中轴,COLOR0000BB,NODRAW;超前DEA:=(EMA(MACD多头,7));超前MACD:=2*(MACD多头-超前DEA)+中轴;{-----------------------------------⼤盘动向-------------------------------}VAR1⼤盘:=LLV(LOW,13);VAR2⼤盘:=HHV(HIGH,13);VAR3⼤盘:=(SMA((CLOSE-VAR1⼤盘)/(VAR2⼤盘-VAR1⼤盘)*顶部,5,1))-顶部/2;VAR4⼤盘:=SMA((VAR2⼤盘-CLOSE)/(VAR2⼤盘-VAR1⼤盘)*顶部,5,1)-顶部/2; ⼤盘散户:=IF(VAR4⼤盘<底部,底部,VAR4⼤盘),COLOR408000;⼤盘主⼒:=IF(VAR3⼤盘<底部,底部,VAR3⼤盘),COLOR330088;{---------------------------------密集成本突破-----------------------------}最⾼获利参数:=顶部/100;VAR1C:=(COST(89)-COST(11))*最⾼获利参数;VAR2C:=(COST(99.9)-COST(1))*最⾼获利参数;单峰:=((1-VAR1C/VAR2C))*顶部;低密:=((COST(90)-COST(60))/VAR2C)*顶部;⾼密:=((COST(40)-COST(1))/VAR2C)*顶部;赢利:= (SMA(WINNER(AMOUNT/VOL/99),2,1))*顶部;活跃度:顶部-顶部/(1+EXPMA(HSL,21)),COLOR774455;{←CYF公众追涨热情指标}70%成本集中度:=IF(VAR1C>顶部,顶部,VAR1C),COLORFFFFFF;90%成本集中度:=IF(VAR2C>顶部,顶部,VAR2C),COLORFF0000;套牢筹码上升:=IF((单峰-赢利)>底部,(单峰-赢利),底部);个股散户:=IF(套牢筹码上升>顶部,顶部,套牢筹码上升),COLOR408000;散户:IF(个股散户=DRAWNULL,DRAWNULL,个股散户),COLOR408000;获利筹码上升:=IF((赢利-单峰)>底部,(赢利-单峰),底部);个股主⼒:=IF(获利筹码上升>顶部,顶部,获利筹码上升),COLOR330088;主⼒:IF(个股主⼒=DRAWNULL,DRAWNULL,个股主⼒),COLOR330088;{--------------------换⼿率,五⽇换⼿率辅助判断个股活跃度-------------------}换⼿:SUM(VOL,1)/CAPITAL*100,COLOR666666,NODRAW;⑤⽇换:SUM(VOL,5)/CAPITAL*100,COLOR999999,NODRAW;{----------------------密集成本突破指标筹码峰画线--------------------------}⾦⾊背景修边1:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,底部,3.05,0),COLOR003333;⾦⾊背景修边2:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,中轴,3.05,0),COLOR003333;⾦⾊背景补充:DRAWBAND(顶部,RGB(51,51,0),中轴,RGB(51,51,0));⾦⾊背景:DRAWBAND(顶部,RGB(51,51,0),底部,RGB(128,128,128));追涨热度峰紫⾊:DRAWBAND(活跃度,RGB(66,52,81),底部,RGB(204,0,0));⾼密峰墨蓝⾊:=DRAWBAND(⾼密,RGB(0,0,51),底部,RGB(0,0,255));低密峰纯蓝⾊:=DRAWBAND(低密,RGB(0,0,102),底部,RGB(0,0,255));90%成本峰:DRAWBAND(90%成本集中度,RGB(0,0,153),底部,RGB(0,0,153)); 70%成本峰:DRAWBAND(70%成本集中度,RGB(0,128,0),底部,RGB(255,255,255));散户峰绿⾊:DRAWBAND(散户,RGB(0,64,0),底部,RGB(204,0,0));主⼒峰红⾊:DRAWBAND(主⼒,RGB(102,26,51),底部,RGB(0,0,255));MACD多空趋势:DRAWBAND(MACD多头,RGB(204,51,51),空头,RGB(0,179,0)); MACD多头重画:DRAWBAND(MACD多头,RGB(153,153,51),MACD多头,RGB(153,153,51));MACD空头重画:DRAWBAND(空头,RGB(0,204,0),空头,RGB(0,204,0));{--------若⽔论坛‘131488’会员提供的通达信■新宝塔线■-----原码-----------}VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARD:=CLOSEVARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 三平底翻⾦:=(REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1))AND VAR1;主⼒启动线:=MA(V,5),COLORFFFFFF;主⼒洗盘线:=MA(V,35),COLOR00FFFF;资⾦异动线:=MA(V,135),COLORFF0000;{----------------------------买卖参考--------------------------------------}出击:=(CROSS(主⼒启动线,资⾦异动线) OR ((主⼒洗盘线 > 资⾦异动线) AND CROSS(主⼒启动线,主⼒洗盘线))),COLORYELLOW;启动:=(主⼒启动线>REF(主⼒启动线,1) AND (CROSS(VOL,主⼒启动线) AND (REF(VOL,1)线,2)))),COLOR45AAEE;成⽴:=三平底翻⾦ AND (出击 OR 启动);买⼊提⽰:=IF(成⽴=1,海⾯*0.5,0) AND 分时判断=1;{------------------------顶部线,天际线,海⾯线,底部线重画-------------------}顶部线:DRAWBAND(顶部,RGB(51,0,255),顶部,RGB(51,0,255));天际线:DRAWBAND(天际,RGB(128,64,64),天际,RGB(128,64,64));海⾯线:DRAWBAND(海⾯,RGB(0,153,153),海⾯,RGB(0,153,153));{------------------------超前MACD多空量能柱--------------------------------}超前MACD红柱1:STICKLINE(超前MACD>=中轴,超前MACD,中轴,1.50,0),COLOR226688;超前MACD红柱2:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.95,0),COLOR4488BB;超前MACD红柱3:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.31,0),COLOR55AADD;超前MACD兰柱1:STICKLINE(超前MACD<=中轴,超前MACD,中轴,1.50,0),COLOR006600;超前MACD兰柱2:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.95,0),COLOR007700;超前MACD兰柱3:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.31,0),COLOR008800;{--------------------------MACD多空量能柱----------------------------------}MACD红柱1:STICKLINE(量能柱>=中轴,量能柱,中轴,1.5,0),COLOR000077; MACD红柱2:STICKLINE(量能柱>=中轴,量能柱,中轴,1.1,0),COLOR000088; MACD红柱3:STICKLINE(量能柱>=中轴,量能柱,中轴,0.6,0),COLOR000099; MACD红柱4:STICKLINE(量能柱>=中轴,量能柱,中轴,0.15,0),COLOR0000AA; MACD兰柱1:STICKLINE(量能柱<=中轴,量能柱,中轴,1.5,0),COLORAA6633;MACD兰柱2:STICKLINE(量能柱<=中轴,量能柱,中轴,1.1,0),COLORBB7744; MACD兰柱3:STICKLINE(量能柱<=中轴,量能柱,中轴,0.6,0),COLORCC8855; MACD兰柱4:STICKLINE(量能柱<=中轴,量能柱,中轴,0.15,0),COLORDD9966; {---------中轴线重画及顶部线,天际线,海⾯线,底部线,多空线⽂字说明-----------}中轴线:DRAWBAND(中轴,RGB(128,128,255),中轴,RGB(128,128,255));顶部线⽂字:DRAWTEXT(CURRBARSCOUNT=1,顶部*0.98,' 顶部线'),COLORFF0033;天际线⽂字:DRAWTEXT(CURRBARSCOUNT=1,天际*0.98,' 天际线'),COLOR404080;海⾯线⽂字:DRAWTEXT(CURRBARSCOUNT=1,海⾯,' 海⾯线'),COLOR999900; 底部线⽂字:DRAWTEXT(CURRBARSCOUNT=1,底部,' 底部线'),COLOR669999; 中轴线⽂字:DRAWTEXT(CURRBARSCOUNT=1,中轴,' 多空线'),COLORFF8080; {-------------------------------传统KDJ指标线重画--------------------------}D线重画:DRAWBAND(D,RGB(255,255,0),D*0.998,RGB(255,255,0));K线重画:DRAWBAND(K,RGB(255,255,255),K,RGB(255,255,255));J线重画:DRAWBAND(J,RGB(255,0,255),J,RGB(255,0,255));【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)-指标公式效果图(⽂档来源:若⽔财经社区)。
自-【股票指标公式】-【通达信】30分钟操盘(副图)
【通达信】30分钟操盘(副图)-指标公式源码根据《一位外汇高手的交易系统》编写的指标。
关键是操作纪律,源码没啥特别的。
MA144:MA(C,N4),COLORBLUE,LINETHICK2;NOTEXT144:IF(MA144>REF(MA144,1),MA144,DRAWNULL),COLORRED,LINETHICK2; MA55:MA(C,N3),COLORGREEN,LINETHICK2;NOTEXT55:IF(MA55>REF(MA55,1),MA55,DRAWNULL),COLORMAGENTA,LINETHICK2; MA21:MA(C,N2),COLORYELLOW;MA8:MA(C,N1),COLORWHITE;外汇不是以线的价位精准为主,而是以趋势型态为主,看图不是看点线的精准度,而是看MA线型的型态结构,来看出波浪、摆幅的大小。
图形参数:30分钟K,以8、21、55MA来看趋势的形成,144MA当作趋势线。
先从基本的一条移动平均做起:1.上升的MA,价位于MA之上,择机做多绝不做空。
2.上升的MA,价位于MA之下,做空宜短打。
3.下降的MA,价位在MA之下,择机做空绝不做多。
4.下降的MA,价位于MA之上,做多宜短打。
5.开始弯曲的第一次碰线、接近线,多是好的出击时机,停损设在穿越MA。
6.打平的MA,双面巴的机率高,观望为主。
一、144MA让你舍弃自我主观意识,接受最笨的方法就是好的方法1.144开始转上升,价格第一次压回碰线买多。
2.144开始转下降,价格第一次回升碰线卖空。
3.144约略打平,表示可能双面巴来巴去,新手还是观察。
出场时间随你高兴,算是练习进场的方法,没来碰线就不要做。
如此,可以让你学习中至少不会大赔,然后慢慢学习价格穿过144MA的各种型态、或是跌破144MA 的各种方式,以及碰线后上涨或下跌波段的各种型态。
多看看过去的图形,自然体会出来波浪。
通达信涨跌顶底主图指标公式
通达信涨跌顶底主图指标公式{涨跌顶底}范围高A:=REFDATE(HHV(H,120),DATE)*1.05;范围低A:=REFDATE(LLV(L,120),DATE)*0.95;MA5:MA(CLOSE,5),COLORWHITE;MA24:=MA(C,24),COLORGREEN,LINETHICK2;MA72:=MA(C,72),COLORRED,LINETHICK2;MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;{=======================仪表盘=========================}主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080;DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500;DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;拉升:IF(CURRBARSCOUNT=1 AND REF(C,1)<REF(C,2) AND C>REF(C,1) AND MA1>REF(MA1,1),CONST(REF(C,1)*1.01),DRAWNULL),COLORFF00FF;A001:STICKLINE(CURRBARSCOUNT=1 AND C>=REF(C,1),拉升,拉升*0.9992,15,0),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=1 AND 拉升=CONST(REF(C,1)*1.01),L*0.99996,' 拉升线'),COLORMAGENTA;DRAWKLINE(H,拉升,L,C);止损:REF(HHV(H,13),1)*0.95,COLORGREEN,DOTLINE;A002:STICKLINE(CURRBARSCOUNT=1 AND C>=REF(C,1),止损,止损*0.9996,15,0),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,止损*0.996,'止损线'),COLORGREEN;DRAWKLINE(H,O,L,C);ZKP:=IF(C>REF(C,1),REF(C,1),DRAWNULL);ZSP:=IF(C>REF(C,1),C,DRAWNULL);DKP:=IF(C<=REF(C,1),REF(C,1),DRAWNULL);DSP:=IF(C<=REF(C,1),C,DRAWNULL);DRAWKLINE(H,DKP,L,DSP);STICKLINE(C<=REF(C,1),DKP,DSP,3.05,0),COLORBLUE;STICKLINE(C<=REF(C,1),DKP,DSP,2.2,0),COLORFF7700;STICKLINE(C<=REF(C,1),DKP,DSP,1.5,0),COLORFF9900;STICKLINE(C<=REF(C,1),DKP,DSP,0.5,0),COLORFFBB00;DRAWKLINE(H,ZKP,L,ZSP);STICKLINE(C>REF(C,1),ZKP,ZSP,3.05,0),COLOR000099;STICKLINE(C>REF(C,1),ZKP,ZSP,2.2,0),COLOR0000CC;STICKLINE(C>REF(C,1),ZKP,ZSP,1.5,0),COLOR0000FF;STICKLINE(C>REF(C,1),ZKP,ZSP,0.5,0),COLORCC66FF;STICKLINE(V/REF(V,1)>2 AND CLOSE>=OPEN,ZKP,ZSP,1,0),COLORYELLOW;MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;牛线:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16 *REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10* REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4* REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLOR8000FF,LINETHICK2;MA10:=MA(C,10);MA30:=MA(C,30);五日乖离率:=(C-MA5)/MA5*100;BB5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB5>30 AND MA5>REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORRED;BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB5<0 AND MA5<REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORGREEN;多空线:=(MA(C,8)+MA(C,17)+MA(C,26)+MA(C,35)+MA(C,44)+MA(C, 53)+MA(C,62)+MA(C,71)+MA(C,80)+MA(C,91)+MA(C,102)+MA( C,113)+MA(C,124)+MA(C,135)+MA(C,146)+MA(C,157)+MA(C,1 68))/17,COLORWHITE;做多:=多空线+STD(C,80),COLOR00FFFF;做空:=多空线-STD(C,80),COLORFFFF00;买线:=EMA(C,4);卖线:=EMA(SLOPE(C,20)*10+C,35);DRAWTEXT(CROSS(买线,卖线),LOW*1.00,'←买'),COLORRED,LINETHICK2;DRAWTEXT(CROSS(卖线,买线),HIGH*1.01,'←卖'),COLORGREEN;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT(CROSS(90,RSI) , HIGH*1.01,'←逢高出局!'),COLOR00FF00 ;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*REF(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*R EF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+R EF(A,20))/210;主力成本:EMA(X,13),COLORFF00FF,LINETHICK0;ZZ:=(O+H+L)/3;YC:=(H+L)/2;YCHJX:=(EMA(ZZ,4))+(YC-REF(ZZ,3))/4;今日买点:EMA(ZZ,3),COLORYELLOW,LINETHICK0;明日买点:YCHJX,LINETHICK0;昨测今日买点:REF(YCHJX,1),LINETHICK0;FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(MA15,FF),(HIGH * 1.02),'←拐点卖'),COLOR00FF00;DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'←拐点买'),COLOR00FFFF;VAR1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2:=CROSS(VAR1,0.9);VAR3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR4:=CROSS(VAR3,0.9);压力: REF(HIGH,BARSLAST(VAR2)), POINTDOT,COLOREA91B5;STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2)),REF(HIGH,BA RSLAST(VAR2)),5,0),COLOREA91B5;支撑: REF(LOW,BARSLAST(VAR4)), POINTDOT,COLOR3791B5;STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4)),REF(LOW,BAR SLAST(VAR4)),5,0),COLOR3791B5;DRAWTEXT(VAR2,HIGH*1.01,'跌'),COLOR00E40E;VAR5:=IF(VAR2,HIGH,IF(VAR4,LOW,0));VAR6:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);VAR7:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);VAR8:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);VAR9:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);VARA:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);VARB:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);DRAWTEXT(CROSS(VAR9,0.9),LOW*0.99,'涨'),COLOR0000FF;DRAWTEXT(CROSS(VARA,0.9),HIGH*1.01,'犹豫'),COLOR00E5E9;现价:CLOSE,POINTDOT,COLORRED;N:=150;判断高低:=3;高:=REF(HHV(H,N),判断高低);近期顶:REFDATE(高,DATE),COLORGREEN,LINETHICK3;最顶:=REFDATE(近期顶,DATE),NODRAW;出:=最顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;STICKLINE(出,C,O,3,0),COLORGREEN;STICKLINE(出,C,O,2,0),COLORGREEN;低:=REF(LLV(L,N),判断高低);近期底:REFDATE(低,DATE),COLORRED,LINETHICK3;最底:=REFDATE(近期底,DATE),NODRAW;进:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O)),NODRAW;STICKLINE(进,C,O,3,0),COLORRED;STICKLINE(进,C,O,2,0),COLORRED;马线:=MA(牛线,8),COLORGREEN;DRAWICON( FILTER(CROSS(牛线,马线),20),马线+0.02 ,1);DRAWTEXT(CROSS(牛线,马线),LOW*0.98,'买'),COLORRED,LINETHICK2;庄家:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+ 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20) )/210,COLORRED;上涨家数:INDEXADV,COLOR0080FF,NODRAW;下跌家数:INDEXDEC,COLORGREEN,NODRAW;涨停:DYNAINFO(3)*1.1,COLORRED,NODRAW;跌停:DYNAINFO(3)*0.9,COLORGREEN,NODRAW;VAR111:=ZIG(3,13);STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,3,0),COLOR66FF00;DRAWTEXT_FIX(STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,5,0),0.00,0.11,0,''),COLOR00FF00,LI NETHICK1;VAR010:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR011:=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);VAR012:=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);VAR013:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR014:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR015:=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);VAR016:=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);VAR017:=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);VAR018:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR019:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR010;买2:=(VAR011+VAR013+VAR015+VAR017);卖1:=(VAR012+VAR014+VAR016+VAR018);B:=IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYEL LOW;DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'*'),COLORRED;S:=IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGR EEN;DRAWTEXT(卖1>0,HIGH*1.02,'*'),COLORGREEN;DRAWICON((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)),LOW*0.97,5) ;DRAWICON((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)),HIGH*1.03,6);DRAWRECTREL(0,500,147,999.4,IF(120,RGB(10,0,0),0));超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;大宗进限制:=IF((超B+大B)=0,0,大宗进);大宗出限制:=IF((超S+大S)=0,0,大宗出);非大宗进限制:=IF(中B+小B=0,0,非大宗进);非大宗出限制:=IF(中S+小S=0,0,非大宗出);主力净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;散户净流入:=(中B+小B)-(中S+小S),COLORRED,NODRAW;净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),COLORRED,NODRAW;大单流入:=(超B+大B)/(超B+大B+超S+大S)*100,NODRAW;大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入);大单流出比:=(超S+大S)/(超B+大B+超S+大S)*100,NODRAW;大单流出限制:=IF((超B+大B+超S+大S)=0,0,大单流出比);总流入比:=(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;总流出比:=(超S+大S+中S+小S)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;成交总量:=(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW;机构参与度:=(超B+超S+大B+大S)/成交总量*100,COLORYELLOW,NODRAW;大单强度:=(超B+大B-超S-大S)/成交总量*100,COLORYELLOW,NODRAW;大单强度限制:=IF(大单强度=0,-100,大单强度);大单强度比:=IF(大单强度>=0,(大单强度限制+100)/2,100-ABS((大单强度限制-100)/2)),NODRAW;超单强度:=(超B-超S)/(超B+超S)*100,COLORYELLOW,NODRAW;超单强度限制:=IF(超单强度=0,-100,超单强度);超单强度比:=IF(超单强度>0,(超单强度限制+100)/2,IF(超单强度<0,100-ABS((超单强度限制-100)/2),0)),NODRAW;DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;DRAWRECTREL(0,CONST(930-(ABS(大宗进)*250/DAZHIV)),35,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(37,CONST(930-(ABS(大宗出)*250/DAZHIV)),72,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(75,CONST(930-(ABS(非大宗进)*250/DAZHIV)),110,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(112,CONST(930-(ABS(非大宗出)*250/DAZHIV)),147,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(150,CONST(940-(ABS(净流入)*250/DAZHIV))-20,190,950,IF(CONST(净流入>0),RGB(200,0,0),RGB(0,125,50)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0001,0.9,0,STRCAT('' ,CON2STR(大宗进/1,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.036,0.9,0,STRCAT('', CON2STR(大宗出/1,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.074,0.9,0,STRCAT('', CON2STR(非大宗进/1,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.111,0.9,0,STRCAT('',CON2STR(非大宗出/1,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.150,0.9,0,STRCAT('', CON2STR(净流入/1,0))),COLORYELLOW;DRAWTEXT_FIX(1,0.000,0.99,0,STRCAT(STRCAT('主力',CON2STR(主力净流入,0)),'万')),COLORMAGENTA;DRAWTEXT_FIX(1,0.078,0.99,0,STRCAT(STRCAT('散户',CON2STR(散户净流入,0)),'万')),COLORCYAN;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.145,0.99,0,'净流入:(万)'),COLORYELLOW;主力买力度:=LARGEINTRDVOL*1000/VOL;主力卖力度:=LARGEOUTTRDVOL*1000/VOL;AAD:=CONST(MAX(ABS(主力买力度),ABS(主力卖力度)))*4,NODRAW;DRAWRECTREL(0,515,CONST(ABS(主力买力度)*560/AAD),568,IF(CONST(主力买力度)>0,RGB(255,0,0),RGB(0,50,0)));DRAWRECTREL(0,570,CONST(ABS(主力卖力度)*560/AAD),623,IF(CONST(主力卖力度)>0,RGB(0,50,0),RGB(255,0,0)));DRAWTEXT_FIX(1,0,0.524,0,STRCAT('主买力度:',CON2STR(主力买力度,0))),COLORYELLOW;DRAWTEXT_FIX(1,0,0.576,0,STRCAT('主卖力度:',CON2STR(主力卖力度,0))),COLORYELLOW;DRAWTEXT_FIX(C>0,0.08,0.0,0,STRCAT('所属行业:',HYBLOCK)),COLORYELLOW;DRAWTEXT_FIX(C>0,0.18,0.0,0,STRCAT('所属地区:',DYBLOCK)),COLORYELLOW;{DRAWTEXT_FIX(C>0,0.20,0.0,0,STRCAT('主题投资:',GNBLOCK)),COLORYELLOW;DRAWTEXT_FIX(1,0.00,0.04,0,'业绩预报:')COLORYELLOW;DRAWTEXT_FIX(1,0.06,0.04,0,EXTERNSTR(0,11))COLORYELL OW;{DRAWTEXT_FIX(C>0,0.0,0.05,0,STRCAT('主题投资:',EXTERNSTR(0,7))),COLORYELLOW;}{DRAWTEXT_FIX(C>0,0.00,0.05,0,STRCAT('业绩预报:',EXTERNSTR(0,11))),COLORYELLOW;}{DRAWTEXT_FIX(C>0,0.0,0.15,0,STRCAT('解禁日期:',EXTERNSTR(0,8))),COLORYELLOW;}{DRAWTEXT_FIX(C>0,0.00,0.20,0,STRCAT('千股千评:',EXTERNSTR(0,1))),COLOR00FFFF;}{DRAWTEXT_FIX(C>0,0.00,0.25,0,STRCAT('智能诊股:',EXTERNSTR(0,2))),COLOR00FFFF;};{DDE显示}DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*1000/FINANCE(7);DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);DRAWRECTREL(150,500,192,540,IF(CONST(DDX)>0,RGB(255 ,0,0),RGB(0,50,0)));DRAWRECTREL(150,545,192,585,IF(CONST(DDY)>0,RGB(255 ,0,0),RGB(0,50,0)));DRAWRECTREL(150,590,192,630,IF(CONST(DDZ)>0,RGB(255 ,0,0),RGB(0,50,0)));DRAWTEXT_FIX(1,0.153,0.500,0,STRCAT('DDX:',CON2STR(DD X,1))),COLORYELLOW,COLORWHITE;DRAWTEXT_FIX(1,0.153,0.548,0,STRCAT('DDY:',CON2STR(DD Y,1))),COLORYELLOW,COLORWHITE;DRAWTEXT_FIX(1,0.153,0.596,0,STRCAT('DDZ:',CON2STR(DD Z,1))),COLORYELLOW,COLORWHITE;T1:=IF (DDX>0 AND REF(DDX,1)<0,1,0);T2:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)<0,2,T1);T3:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)<0,3,T2);T4:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)<0,4,T3);T5:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)<0,5,T4);T6:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)<0,6,T5);T7:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)<0,7,T6);T8:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)<0,8,T7);T9:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)<0,9,T8);T:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)>0,10,T9);DRAWTEXT_FIX(1,0.190,0.500,0,STRCAT(STRCAT('',CON2STR(T,0)),' [天] ')),COLORYELLOW;T11:=IF (DDY>0 AND REF(DDY,1)<0,1,0);T21:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)<0,2,T11);T31:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)<0,3,T21);T41:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)<0,4,T31);T51:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)<0,5,T41);T61:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)<0,6,T51);T71:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)<0,7,T61);T81:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)<0,8,T71);T91:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)<0,9,T81);TY01:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)>0,10,T91);DRAWTEXT_FIX(1,0.190,0.548,0,STRCAT(STRCAT('',CON2STR(TY01,0)),' [天] ')),COLORYELLOW;T1Z:=IF (DDZ>0 AND REF(DDZ,2)<0,1,0);T2Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)<0,2,T1Z);T3Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)<0,3,T2Z);T4Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)<0,4,T3Z);T5Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)<0,5,T4Z);T6Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)<0,6,T5Z);T7Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)<0,7,T6Z);T8Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)<0,8,T7Z);T9Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)<0,9,T8Z);TZ:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)>0,10,T9Z);DRAWTEXT_FIX(1,0.190,0.596,0,STRCAT(STRCAT('',CON2STR(TZ,0)),' [天] ')),COLORYELLOW;M1:=30;P2:=80;VAR11:=(C+H+O+L)/4;买入:=XMA(VAR11,M1)*(1-P2/1000),COLORFFFFFF,LINETHICK2;反弹:=EMA(EMA(EMA(HIGH,5),5),5)*0.95,COLORRED,LINETHICK1;XG:=CROSS(买入,反弹);DRAWTEXT(XG,(LOW -0.2),'暴' ),COLORRED;。
【股票指标公式下载】-【通达信】操盘线(主力、散户、操作、大单动向)
【通达信】操盘线(主力、散户、操作、大单动向)-指标公式源码VAR1:=LLV(LOW,13);VAR2:=HHV(HIGH,13);VAR3:=SMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5,1);VAR4:=SMA((VAR2-CLOSE)/(VAR2-VAR1)*100,5,1);DRAWBAND(VAR3,RGB(155,50,50),50,RGB(0,100,50));主力:VAR3,COLORRED;散户:VAR4,COLORGREEN;VAR5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)), 5,1)*100;操作:EMA(VAR5,3),COLORYELLOW;STICKLINE(C,90,90,1,0),COLOR3C3CFF;STICKLINE(C,50,50,1,0),COLORYELLOW;STICKLINE(C,10,10,1,0),COLORCYAN;N:=20;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPE N,CLOSE)-LOW)));QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN (CLOSE,OPEN))));QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLO SE,OPEN)-JJ)));大单动向:20*((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,100000000,1000000),COLOR00AA AA,LINETHICK;DX:=(MA(大单动向,5)*N)*2;STICKLINE(大单动向>0,50,50+大单动向*8.5,2.5,0),COLORYELLOW; STICKLINE(大单动向<0,50,50+大单动向*8.5,2.5,0),COLORBLUE;涨跌:=IF(BETWEEN(C,REF(C,1),H),VOL,0);动因:=IF(BETWEEN(C,REF(C,1),L),VOL,0);CC2:=IF(涨跌 AND 动因,0,VOL/3);涨跌动因:3*(涨跌-(动因+CC2))/IF(CAPITAL<1,SUM(INDEXV,71),CAPITAL),LINETHICK0; STICKLINE(涨跌动因>0,10,10+涨跌动因*28.5,2,0 ),COLORYELLOW; STICKLINE(涨跌动因<0,10,10+涨跌动因*28.5,2,0 ),COLORBLUE;【通达信】操盘线(主力、散户、操作、大单动向)-指标公式效果图(文档来源:若水财经社区)。
通达信顶底趋势主图指标公式
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;。
通达信分时顶底之王指标公式
通达信分时顶底之王指标公式
该指标的计算公式如下:
顶点概率=(向上运行最大长度/总长度)*100%
底点概率=(向下运行最大长度/总长度)*100%
其中,向上运行最大长度是指自前一个顶点到当前顶点的最大上涨幅度,向下运行最大长度是指自前一个底点到当前底点的最大下跌幅度。
总长度是指自前一个顶点到当前底点的总距离。
该指标的计算步骤如下:
1.首先,确定一个统计周期,例如10个交易日。
2.统计周期内,记录每个交易日的最高价和最低价。
3.根据最高价和最低价的走势,确定每个交易日的顶点和底点。
4.计算每个顶点和底点的向上运行最大长度和向下运行最大长度。
5.计算顶点概率和底点概率。
该指标的应用方法如下:
1.当顶点概率大于底点概率时,说明市场处于上升趋势,可以考虑买入或持有股票。
2.当底点概率大于顶点概率时,说明市场处于下降趋势,可以考虑卖出或持币观望。
3.当顶点概率和底点概率接近时,说明市场处于震荡状态,可以考虑观望或进行短线交易。
4.注意,该指标只是一种辅助工具,不能单独作为买卖决策的依据,需要结合其他技术指标和基本面分析进行综合判断。
通达信分时顶底之王指标公式(一)是一种简单而有效的短线交易指标,可以帮助投资者把握市场的走势和反转点。
但是,需要注意的是,市场是随时变化的,指标只能提供一种参考和辅助工具,具体操作还需要根据个人的投资经验和风险承受能力做出判断。
通达信机构付费操盘-绝地反击主图指标通达信指标源码
A:=AMOUNT/V/100;VARA:=EMA((((A-EMA(A,13))/EMA(A,13))*(0-100)),5);QQ:=EMA(((VARA/10)+EMA(A,13)),0);行情线:=MA(A,1);重心:=(C+0.618*REF(C,1)+0.382*REF(C,1)+0.236*REF(C,3)+0.146*REF(C,4))/2.382; 【操盘线】:EMA(((SLOPE(C,22)*20)+C),55),COLORYELLOW,LINETHICK4;【黄金线】:IF(重心>=【操盘线】,【操盘线】,DRAWNULL),COLORRED,LINETHICK2; 【空仓线】:IF(重心<【操盘线】,【操盘线】,DRAWNULL),COLORCYAN,LINETHICK2; DRAWTEXT(ISLASTBAR,【操盘线】,'【操盘线】'),COLORRED;{引:EMA(CLOSE,2),LINETHICK1,COLORMAGENTA;探:MA(CLOSE,5),LINETHICK1;}变:EMA(CLOSE,5),LINETHICK2,COLORYELLOW;金:IF(变>REF(变,1),变,DRAWNULL),COLORRED,LINETHICK2;空:IF(变<REF(变,1),变,DRAWNULL),COLORGREEN,LINETHICK2;DRAWTEXT(ISLASTBAR,变,'【钻石】'),COLORRED;{顶底信号}辅助线:MA(C,8),COLORMAGENTA,LINETHICK1;上升:IF(辅助线>REF(辅助线,1),辅助线,DRAWNULL),COLORMAGENTA,LINETHICK2;下降:IF(辅助线<REF(辅助线,1),辅助线,DRAWNULL),COLORGRAY,LINETHICK1;DA:=(EMA(H,1)+EMA(L,1)+EMA(H,1)+EMA(H,1))/4,LINETHICK2;DB:=EMA(REF(HHV(H,25),1),2),COLORGREEN,LINETHICK1;{DRAWTEXT(CROSS(DB,DA),DB,'←险'),COLORGREEN,LINETHICK1;}DRAWICON(CROSS(DA,【操盘线】)AND DA>REF(DA,2),【操盘线】,9);{涨跌停显示}涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);STICKLINE(涨停,O,C,1,0),COLORYELLOW;ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF<-9.9,O,C,1,0),COLORBLUE;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:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*1 00;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)* 100;VAR10:=IF(TROUGHBARS(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) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=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);VAR16:=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);VAR17:=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);VAR18:=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);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) -LLV(LOW,5))),34));F:IF(CROSS(VAR200,MA(VAR300,5)),LOW *0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLORFF00FF;DRAWTEXT(CROSS(S,卖1),S*1.02,'逃'),COLORWHITE,LINETHICK1;DRAWTEXT(CROSS(B,买1),B*0.98,'←准备'),COLORRED,LINETHICK1;{价:}{JC1:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;参考价1:SMA(JC1,5,1),CIRCLEDOT,COLORGREEN;IF(C>=参考价1,参考价1,DRAWNULL),CIRCLEDOT,COLOR0000FF;}PH:=TROUGHBARS(2,5,1);LL:=HHV(H,PH);TJ1:=LL=HIGH AND LL<REF(LL,1);{//=1}TS:=SUMBARS(TJ1,2);TJ:=PEAKBARS(2,5,1)=1 AND TS>=PH;DRAWICON(TJ,HIGH*1.03,2);警告灯:DRAWICON(TJ,HIGH*1.008,15);PL:=BARSLAST(TJ);支撑:IF(BARSLAST(TJ1),REF(LOW,BARSLAST(TJ1)),DRAWNULL),COLOREA91B5;压力:IF(BARSLAST(TJ),REF(HIGH,PL),DRAWNULL),COLORYELLOW;TJ_2:=LOW>REF(REF(LOW,TS),PL);DRAWTEXT(ISLASTBAR,压力,'压力'),COLORYELLOW;DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLOREA91B5;{DRAWICON(COUNT(TJ_2,PL+1)=1,HIGH*1.005,2);{//向下的箭头表示出局点} {DRAWICON(BARSLAST(TJ1),REF(LOW*0.995,BARSLAST(TJ1)),1);};。
通达信分时顶底之王指标公式(一)
通达信分时顶底之王指标公式(一)通达信分时顶底之王指标公式简介通达信分时顶底之王指标是一种技术分析指标,用于判断股票的分时图形态,进而预测价格的趋势。
本文将介绍该指标的相关公式,并举例解释说明其应用。
公式×1001.顶底之王指标公式一:K=C−LH−L其中,C代表收盘价,L代表当日最低价,H代表当日最高价。
该公式计算了收盘价在当日最低价和最高价之间的相对位置,用百分比表示。
数值越高,说明收盘价离当日最高价越近,可能代表股票价格处于顶部。
×1002.顶底之王指标公式二:D=H−CH−L其中,C代表收盘价,L代表当日最低价,H代表当日最高价。
该公式计算了收盘价在当日最低价和最高价之间的相对位置,用百分比表示。
数值越高,说明收盘价离当日最低价越远,可能代表股票价格处于底部。
应用举例假设某股票的分时图数据如下:时间 | 最高价 | 最低价 | 收盘价 |||||| | 09:30 | | | | | 09:31 | | | | | 09:32 | | | | | 09:33 | | | | | 09:34 | | | |根据公式一,我们可以计算出每个时间点的顶底之王指标K值:时间 | K值 |||| | 09:30 | | | 09:31 | | | 09:32 | | | 09:33 | | | 09:34 | |根据公式二,我们可以计算出每个时间点的顶底之王指标D值:时间 | D值 |||| | 09:30 | | | 09:31 | | | 09:32 | | | 09:33 | | | 09:34 | |通过观察K值和D值的变化,我们可以判断分时图的形态。
在本例中,09:33时间点的K值和D值相近,说明收盘价的相对位置较为均衡,可能代表价格处于横盘整理阶段;而09:34时间点的K值较高,D 值较低,说明收盘价离最高价较近,离最低价较远,可能代表价格即将上涨。
通过类似的分析,我们可以对股票的价格趋势进行预测和判断。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
【通达信】顶底主图(攻击线、操盘线、生命线)-指标公式源码攻击线5:MA(C,5)LINETHICK1;操盘线10:MA(C,10)LINETHICK1;生命线30:MA(C,30)LINETHICK1;决策线60:MA(C,60)LINETHICK1;DRAWTEXT(CROSS(攻击线5,操盘线10),LOW*0.95,'攻抄金叉'),COLORRED; DRAWTEXT(CROSS(生命线30,决策线60),LOW*0.95,'生决金叉'),COLORMAGENTA; N:=20;M:=30;P1:=80;P2:=100;VAR101:=(C+H+O+L)/4;卖出:XMA(VAR101,N)*(1+P1/1000),COLORRED,LINETHICK2;买入:XMA(VAR101,M)*(1-P2/1000),COLORLIRED,LINETHICK2;幅度:=100*(卖出-买入)/买入,NODRAW;MA1:=MA(VAR101,3);STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN; STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA; STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'买'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'卖'),COLORGREEN;MA20:=MA(CLOSE,20);MA120:=MA(CLOSE,120);MA30:=MA(CLOSE,37);MAP:=MA(CLOSE,8);AA5:=MA(CLOSE,21);AA10:=MA(CLOSE,8),COLORFF0000;AA12:=MA(CLOSE,12),COLORFF0000;BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);VAR01:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);中期大底:=LLV(LOW,30),;短期底部0:=LLV(HIGH,30);短底:=EMA(VAR01,5);支撑:=HHV(短底,60);压力1:=HHV(LOW,20),COLORFAABEC;压力:=SMA(LOW,5,1);中线:=MA(CLOSE,3);DRAWTEXT(FILTER(((((HIGH > 支撑) AND (CLOSE < 支撑)) AND ((CLOSE / OPEN) > (0 - 1.06))) AND (CLOSE < OPEN)),5),(HIGH + 0.02),'逃'),COLORFFFF00;中轨道:=(MA(HIGH,15) * 1.05);天:=(MA(LOW,15) * 0.985);人:=(MA(LOW,15) * 0.96);地:=(((HIGH + LOW) + CLOSE) / 3);B1:=HHV(地,(4 * 15));B6:=LLV(地,(4 * 15));B7:=(B1 - B6);B8:=(MA(((地 - B6) / B7),2) * 80);VAR1:=(((CLOSE - LLV(LOW,100)) / (HHV(HIGH,100) - LLV(LOW,100))) * 200); 飞龙顶底线1:=SMA(VAR1,3,1);VAR2:=SMA(飞龙顶底线1,3,1);VAR3:=((3 * 飞龙顶底线1) - (2 * VAR2));VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,5);VAR6:=(EMA((((CLOSE - VAR4) / (VAR5 - VAR4)) * 100),4) * 2);VAR7:=EMA(((0.667 * REF(VAR6,1)) + (0.333 * VAR6)),2);VAR8:=((3 * VAR6) - (2 * VAR7));VAR9:=(POW(MA(CLOSE,5),2) + MA(CLOSE,5));VARA:=(POW(MA(LOW,5),2) + MA(LOW,5));VARB:=(POW(MA(HIGH,5),2) + MA(HIGH,5));VARC:=(((((VAR9 - LLV(VARA,64)) / (HHV(VARB,64) - LLV(VARA,64))) * 150) + 65) - 10);VARD:=((SMA(VARC,3,1) * 1.5) - 100);VARE:=SMA(VARD,3,1);VARF:=((3 * VARD) - (2 * VARE));VAR10:=(((HIGH + LOW) + (CLOSE * 2)) / 4);VAR11:=EMA(VAR10,13);VAR12:=STD(VAR10,13);VAR13:=(((VAR10 - VAR11) * 100) / VAR12);VAR14:=EMA(VAR13,5);VAR15:=EMA(VAR14,13);VAR16:=((EMA(VAR14,13) + 200) - 100);VAR17:=EMA(VAR16,10);VAR18:=((3 * VAR16) - (2 * VAR17));VAR19:=(((飞龙顶底线1 + VAR6) + VARD) + VAR16);VAR1A:=(((VAR2 + VAR7) + VARE) + VAR17);VAR1B:=(((VAR3 + VAR8) + VARF) + VAR18);VAR1C:=(((HIGH + LOW) + CLOSE) / 3);VAR1D:=((AMOUNT / VOL) / 100);VAR1E:=((SUM(AMOUNT,5) / SUM(VOL,5)) / 100);VAR1F:=((VAR1C - MA(VAR1C,34)) / (0.015 * AVEDEV(VAR1C,34)));VAR21:=((((HIGH + LOW) + CLOSE) + VAR1C) / 4);VAR22:=EMA(VAR21,24);VAR23:=STD(VAR21,24);VAR24:=(((VAR21 - VAR22) / VAR23) * 100);VAR25:=((VAR1C - MA(VAR1C,24)) / (0.015 * AVEDEV(VAR1C,24)));VAR26:=EMA(VAR24,5);VAR27:=((VAR1D - MA(VAR1D,21)) / (0.015 * AVEDEV(VAR1D,21)));VAR28:=((VAR1E - MA(VAR1E,90)) / (0.015 * AVEDEV(VAR1E,90)));VAR29:=(((((((VAR28 + VAR27) + VAR26) + VAR25) + VAR1F) / 5) + 165) / 4);VAR2A:=(((((VAR19 + VAR1A) + (VAR1B * 30)) / 32) / 5) - 15);VAR2B:=(((VAR29 + VAR2A) / 2) / 1.1);VAR2C:=VAR2B;短线:=MA(VAR2C,26);MID:=(短线 + (2 * STD(VAR2C,26)));UPPER:=(短线 - (2 * STD(VAR2C,26)));LOWER:=IF((VAR2C > 短线),短线,VAR2C);XY:=MA(CLOSE,5);M80:=MA(CLOSE,80);短期底部:=(LLV(HIGH,30) * 0.93);MA80:=LLV(HIGH,30);短期底部2:=SMA(CLOSE,2,1);趋势:=(MA(LOW,10) * 0.96);趋:=(EMA(OPEN,107) * 0.897);超跌位2:=MA(CLOSE,15);GF:=MA(CLOSE,10);MAN:=(SMA(HIGH,21,2) * 1.05);上1:=(HHV(短底,60) * 0.92);压力2:=(SMA(HIGH,21,2) * 1.035);阻挡线:=(SMA(LOW,21,2) * 0.96);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RSV:=SMA(下档线,3,1);K:=SMA(RSV,3,1);D:=((3 * RSV) - (2 * K));J:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR2P:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR3P:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR4P:=(((J + (2 * VAR2P)) + (3 * VAR3P)) / 6);VAR5P:=MA(VAR4P,3);VAR6P:=(((CLOSE - LLV(LOW,34)) / (HHV(HIGH,34) - LLV(LOW,34))) * 100); RSV12:=SMA(VAR6P,3,1);K12:=SMA(RSV12,3,1);D12:=((3 * RSV12) - (2 * K12));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(J12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));J24:=IF(CROSS(D,D24),LOW,REF(LOW,BARSLAST(CROSS(D,D24))));压力位:=IF(CROSS(D24,D),HIGH,REF(HIGH,BARSLAST(CROSS(D24,D))));支撑位:=IF((CLOSE >= MA(CLOSE,20)),80,50);U2L:=IF((CLOSE >= MA(CLOSE,20)),50,20);L2L:=IF(((D < 支撑位) AND (REF(D,1) >= 支撑位)),HHV(REF(HIGH,1),(BARSLAST(((D >= 支撑位) AND (REF(D,1) < 支撑位))) - 1)),REF(HHV(REF(HIGH,1),(BARSLAST(((D >= 支撑位) AND (REF(D,1) < 支撑位))) - 1)),BARSLAST(((D < 支撑位) AND REF(D,1)))));RH1:=IF((HIGH > L2L),LOW,REF(LOW,BARSLAST((HIGH > L2L))));RH4:=IF((HIGH > L2L),D,REF(D,BARSLAST((HIGH > L2L))));RH42:=IF((((HIGH > RH1) AND (D < RH4)) AND (D <D24)),HIGH,REF(HIGH,BARSLAST((((HIGH > RH1) AND (D < RH4)) AND (D <D24)))));RH5:=IF(((D > U2L) AND (REF(D,1) <= U2L)),LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),REF(LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),BARSLAST(((D > U2L) AND REF(D,1))))); RL1:=IF((LOW < RH5),HIGH,REF(HIGH,BARSLAST((LOW < RH5))));RL4:=IF((LOW < RH5),D,REF(D,BARSLAST((LOW < RH5))));RL42:=IF((((LOW < RL1) AND (D > RL4)) AND (D >D24)),LOW,REF(LOW,BARSLAST((((LOW < RL1) AND (D > RL4)) AND (D > D24))))); 长期底部:=LLV(HIGH,30);DRAWTEXT(FILTER(((((RL42 = J24) AND (CLOSE > OPEN)) AND (CLOSE > 长期底部)) AND (LOW <= J24)),20),(LOW - 0.12),'底成'),COLOR0EABFF;RL5:=(SMA(HIGH,5,2) * 1.05);上:=(SMA(LOW,5,2) * 0.96);下:=SMA(LOW,2,1);中:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X1:=EMA(中,10);X2:=REF(X1,1);X3:=((REF(HIGH,1) + REF(LOW,1)) / 2);X4:=(MA(CLOSE,21) + (2 * STD(CLOSE,21)));X5:=REF(CLOSE,1);X6:=((SMA(MAX((CLOSE - X5),0),7,1) / SMA(ABS((CLOSE - X5)),7,1)) * 100);X7:=CROSS(79,X6);X8:=FILTER(X7,4);X9:=MA(CLOSE,115);VAR001:=EMA(CLOSE,8);飞龙顶底线:=EMA(VAR001,20);VAR002:=CROSS(VAR001,飞龙顶底线);VAR003:=(VAR001 < MA(CLOSE,20));VAR004:=(((HHV(HIGH,36) - CLOSE) / (HHV(HIGH,36) - LLV(LOW,36))) * 100); VAR005:=SMA(VAR004,5,1);VAR006:=SMA(VAR005,8,1);VAR007:=(CROSS(VAR005,VAR006) AND (VAR006 < 5));VAR008:=((CLOSE > (LLV(CLOSE,60) + (0.3 * LLV(CLOSE,60)))) AND VAR007); VAR009:=IF((CLOSE > 1000),VAR007,VAR008);VAR00F:=CROSS(X1,X2);MA115:=VAR00F;低买:=(VAR002 AND VAR003);黑马起步:=VAR009;DRAWTEXT(X8,(HIGH * 1.03),'出货'),COLOR9000F5;DRAWTEXT((黑马起步 > 0),(HIGH * 1.04),'逃命'),COLORFF0000;逃遁:=(SMA(HIGH,21,2) * 1.05);阻挡:=(SMA(LOW,21,2) * 0.94);DRAWTEXT(FILTER(((((((((CLOSE / OPEN) > 1.03) AND ((超跌位2 - REF(超跌位2,1)) > 0)) AND ((CLOSE - REF(CLOSE,1)) > 0)) AND (HIGH < 压力1)) AND (CLOSE < 压力1)) AND ((压力2 - REF(压力2,1)) > 0)) AND (CLOSE < MAN)),3),LOW,'出击'),COLOR646E69;DRAWTEXT((((((低买 > 0) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 压力位)) AND (HIGH < X9)) AND ((X2 - REF(X2,1)) > 0)),LOW,'黑马'),COLOR00FF00; DRAWTEXT((((CROSS(VAR2C,UPPER) AND (HIGH < 压力1)) AND ((XY -REF(XY,1)) > 0)) AND (HIGH < 支撑)),LOW,'买'),COLORFFFFFF; DRAWTEXT(FILTER((((((MA115 AND (CLOSE < 压力位)) AND ((人 - REF(人,1)) >0)) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 上1)) AND ((CLOSE / OPEN) >1.03)),5),LOW,'●买'),COLOR93EE7D;DRAWTEXT(((((LOW <= 上) AND (HIGH >= 短期底部)) AND (CLOSE >= 长期底部)) AND ((CLOSE / OPEN) > 1.03)),(LOW - 0.08),'★抄底'),COLOR0000FF;DRAWTEXT(FILTER((((((LOW <= 阻挡线) AND ((MA20 - REF(MA20,1)) > 0)) AND (OPEN <= 上1)) AND (HIGH > 上1)) AND (CLOSE > 阻挡线)),5),LOW,'涨10%'),COLORFFFFFF;DRAWTEXT(FILTER((((((B8 <= 1) AND (LOW <= 阻挡)) AND (CLOSE > OPEN)) AND (LOW <= 中期大底)) AND (CLOSE >= 长期底部)),3),(LOW - 0.08),'短抄E'),COLORA100FF;DRAWTEXT(FILTER((((CROSS(趋势,趋) AND (HIGH < M80)) AND (HIGH < 压力1)) AND LLV(LOW,0)),10),LOW,'果断买'),COLOR668800;DRAWTEXT(FILTER(((CROSS(中线,人) AND (LOW <= 人)) AND (CLOSE >= 人)),4),(LOW - 0.06),'买'),COLOR00FF00;DRAWTEXT(FILTER((((((((MA20 - REF(MA20,1)) > 0) AND (HIGH < 支撑)) AND ((AA10 - REF(AA10,1)) > 0)) AND (HIGH < 压力1)) AND (VOL >= REF(VOL,1))) AND CROSS(CLOSE,MA20)),57),LOW,'突破生命线'),COLOR0000FF;DRAWTEXT(FILTER(((((LOW <= MA80) AND (CLOSE > MA80)) AND (CLOSE > OPEN)) AND (短期底部2 <= MA80)),8),LOW,'底'),COLORFFFF00;DRAWTEXT(((CROSS(MA20,压力位) AND (LOW <= MA20)) AND ((MA20 -REF(MA20,1)) > 0.02)),(LOW - 0.03),'●绝佳买点'),COLORAFA0AF; DRAWTEXT((((((((CROSS(CLOSE,MA20) AND (HIGH < 压力位)) AND (OPEN < MA20)) AND (HIGH < 支撑)) AND ((MAN - REF(MAN,1)) > 0)) AND ((X1 - REF(X1,1)) > 0)) AND (D < 63)) AND ((MA20 - REF(MA20,1)) > 0)),(LOW - 0.05),'●大牛浮水'),COLOR73777F;DRAWTEXT(CROSS(中期大底,短期底部),(LOW - 0.02),'短线买');短趋势线:=MA(CLOSE,13);中趋势线1:=MA(CLOSE,33),LINETHICK1;中趋势线:=MA(CLOSE,55);涨:=IF(短趋势线>REF(短趋势线,1),短趋势线,DRAWNULL),COLORRED,LINETHICK3;平:=IF(短趋势线=REF(短趋势线,1),短趋势线,DRAWNULL),COLOR00FFFF,LINETHICK3;跌:=IF(短趋势线<REF(短趋势线,1),短趋势线,DRAWNULL),COLORGREEN,LINETHICK3;STICKLINE(CROSS(MA(CLOSE,13),C) AND MA(CLOSE,13)>REF(MA(CLOSE,13) ,1) AND V<REF(V,1) ANDMA(CLOSE,13)>MA(CLOSE,55) ,L,L*0.98,3,0),COLORYELLOW;DRAWTEXT(CROSS(MA(CLOSE,13),C) AND INDEXC>MA(INDEXC,13) ANDMA(CLOSE,13)>REF(MA(CLOSE,13) ,1) AND V<REF(V,1) ANDMA(CLOSE,13)>MA(CLOSE,55) ,L*0.95,'买'),COLORRED,LINETHICK2;VAR011:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA( CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;VAR012:=HHV(VAR011>20,10);DRAWTEXT(VAR011<-20 AND INDEXC<MA(INDEXC,13) AND FILTER(VAR011>REF(VAR011,1),5),L*0.93,'抄底'),COLORYELLOW,LINETHICK2;VAR013:=IF(MA(CLOSE,13)>REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWNULL); DRAWTEXT((IF(CLOSE>MA(CLOSE,13) ANDOPEN<CLOSE,-0.1,0))AND((C-REF(C,1))/(REF(C,1))>0.061)AND(MA(CLOSE,13)=VAR013) AND (MA(CLOSE,1),MA(CLOSE,13)) AND(VOL>REF(HHV(VOL,3),1)*2),L*0.98,'主力介入'),COLORMAGENTA;X:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),68);Y:=EMA(CLOSE,10);【通达信】顶底主图(攻击线、操盘线、生命线)-指标公式效果图(文档来源:若水财经社区)。