通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、通达信抄底逃顶指标公式 VAR1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)- LLV(LOW,36))*100; VAR2:=SMA(VAR1,3,1); VAR3:=SMA(VAR2,3,1); VAR4:=SMA(VAR3,3,1); 波:VAR3; 段:VAR4; VAR5:=CROSS(VAR3,VAR4)ANDVAR3 DRAWTEXT(FILTER(VAR5,10)=1,40, 抄底 ),COLORRED; STICKLINE(FILTER(VAR5,10)=1,0,30,10,0),COLORRED; VAR9:=CROSS(VAR4,VAR3)ANDVAR3 STICKLINE(FILTER(VAR9,5)=1,80,100,10,0),COLORGREEN; DRAWTEXT(FILTER(VAR9,5)=1,70, 逃顶 ),COLORGREEN; VAR8:=CROSS(VAR2,VAR3)ANDVAR3 80ANDVAR3 VAR4; STICKLINE(VAR8,85,100,10,0),COLOR0099FF; 100,COLORBBBBBB,LINETHICK3; 0,,LINETHICK3; AA:=LLV(LOW,36); BB:=HHV(HIGH,30); 风险:80,COLORFF00FF; 小心:87.5,COLOR00FF00; DD:=(EMA(((CLOSE-AA)/(BB-AA))*(4),4))*(25); 股神:DD,COLOR0000FF,LINETHICK2; 股海:=(((DD-LLV(DD,21))/(HHV(DD,21)-LLV(DD,21)))*(4))*(25); 目标出现B:IF(CROSS(股海,90)AND(股神 40),70,0),COLORFFFF00; 跟踪:10,COLOR0000FF; 目标出现A:IF((COUNT((股神 REF(股神,1)),1)=1)AND(REF(股 神,1) REF(REF(股神,1),1))AND(股神 跟踪),50,0),COLORF00FF0; VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100; VAR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; BBB:SMA(VAR2,5,1)-8,LINETHICK2,COLORRED; P:=1.5; OB:=BBB; A1:=REF(OB,P)=HHV(OB,2*P+1); B1:=FILTER(A1,P); C1:=BACKSET(B1,P+1); D1:=FILTER(C1,P);{高点} A2:=REF(OB,P)=LLV(OB,2*P+1); B2:=FILTER(A2,P); C2:=BACKSET(B2,P+1); D2:=FILTER(C2,P);{低点} R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11 REF(R11,1); 压力线:DRAWLINE(D1,OB,S11,OB,1),LINETHICK1,COLORFFFF00,POINTDOT; T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11 REF(T11,1); 支撑线:DRAWLINE(D2,OB,U11,OB,1),COLORFFFF00,POINTDOT; PX:=5; OBX:=BBB; A1X:=REF(OBX,PX)=HHV(OBX,2*PX+1); B1X:=FILTER(A1X,PX); C1X:=BACKSET(B1X,PX+1); D1X:=FILTER(C1X,PX);{高点} A2X:=REF(OBX,PX)=LLV(OBX,2*PX+1); B2X:=FILTER(A2X,PX); C2X:=BACKSET(B2X,PX+1); D2X:=FILTER(C2X,PX);{低点} R11X:=BACKSET(ISLASTBAR,BARSLAST(D1X)+1); S11X:=R11X REF(R11X,1); 压力线 X:DRAWLINE(D1X,OBX,S11X,OBX,1),LINETHICK1,COLORGREEN,LINETHICK2; T11X:=BACKSET(ISLASTBAR,BARSLAST(D2X)+1); U11X:=T11X REF(T11X,1); 支撑线X:DRAWLINE(D2X,OBX,U11X,OBX,1),COLORGREEN,LINETHICK2;二、通达信抄底王指标公式 周期:=15;过滤:=8;选股:=-26;抄底:=-40; T:0,POINTDOT; VAR2:=MA(CLOSE,5); VAR3:=MA(CLOSE,10); VAR4:=MA(CLOSE,20); VAR5:=MA(CLOSE,30); VAR6:=(VAR2+VAR3+VAR4+VAR5)/4; VAR7:=(VAR6-REF(VAR6,周期))/REF(VAR6,周期)*100; VAR8:=(VAR6-REF(VAR6,周期))/REF(VAR6,周期)*100; VAR9:=EMA(VAR7,过滤); 反转:STICKLINE(VAR9 1*REF(VAR9,1),VAR7,0,5,0),COLOREE00EE; 持股:STICKLINE(VAR7 1*REF(VAR7,1),VAR7,VAR9,5,0),COLORRED; 持币:STICKLINE(VAR7 1*REF(VAR7,1),VAR7,VAR9,5,1),COLORGREEN; 洗盘:STICKLINE(VAR7 1*REF(VAR7,1)ANDVAR9 1*REF(VAR9,1),VAR7,VAR9,10, 0), COLOR00EEFF; VAR10:=(CLOSE-MA(CLOSE,58))/MA(CLOSE,58)*100; VAR11:=(VAR10 1*REF(VAR10,1)ANDVAR10 选股ANDVAR10 抄底)*1.5; VAR12:=VOL/CAPITAL*100; VAR13:=LLVBARS(LOW,50); VAR14:=SUM(VOL,VAR13); VAR15:=HHVBARS(HIGH,50); VAR16:=SUM(VOL,VAR15); VAR17:=(CLOSE-REF(OPEN,VAR15))/REF(OPEN,VAR15)*100; VAR18:=VAR16/CAPITAL*100; VAR19:=(CLOSE-REF(OPEN,VAR13))/REF(OPEN,VAR13)*100; VAR20:=VAR14/CAPITAL*100; VAR21:=MA(CLOSE,3); VAR22:=REF(CLOSE,2)*0.865; VAR23:=REF(CLOSE,13)*0.772; VAR24:=MIN(VAR22,VAR23); VAR25:=MA(CLOSE,13); 抄底王:IF((CLOSE-VAR24)/CLOSE 0.030ANDVAR17 (-35)ANDSUM(VAR12, 5)/5 1.800,1 ,0)*10,COLORWHITE; DRAWTEXT(抄底王,抄底王, 成功率90.22%,共发出指示1289次.底追 ){,COLORFFAA 00}; VAR26:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100; VAR27:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100; VAR28:=EMA(VAR27,9); VAR29:=2*(VAR27-VAR28); DRAWTEXT(VAR27 (-50)ANDVAR26 7ANDVAR27 VAR28,(-10), 底 ), COLORWHITE; DRAWTEXT(VAR27 (-50)ANDVAR26 7ANDVAR27 =VAR28,5, 追 ),COLORWHITE; STICKLINE(VAR27 (-50)ANDVAR26 7,0,(-10),5,0),COLORFFFF66; BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100; BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100; BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100; BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6; 乖离:=MA(BIAS,3); 抄底:IF(乖离 -12AND乖离 =-18,-4,0),COLORCYAN,LINETHICK1; STICKLINE(乖离 -12AND乖离 =-18,2,0,6,0),COLORCYAN; 抄底二:IF(乖离 -18,3,0),COLORFF35FF,LINETHICK1; STICKLINE(乖离 -18,3,0,6,0),COLORFF35FF; 抄底三:IF(乖离 -6,5,0),COLORRED,LINETHICK1; STICKLINE(乖离 -6,5,3,2,1),COLORRED; 抄底四:IF(乖离 -4.5,0,0),COLOR00FFFF,LINETHICK1; STICKLINE(乖离 -4.5,0,1,3,1),COLOR00FFFF; VAR1:=DMA(CLOSE,VOL/MA(VOL,4)/4); VAR2:=DMA(CLOSE,VOL/MA(VOL,31)/31); VAR3:=(CLOSE-VAR1)/VAR1*100 VAR4:=(VAR1-VAR2)/VAR2*100 VAR5:=(CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100 VAR6:=SMA(MAX(CLOSE-REF(CLOSE,1),0),3,1)/SMA(ABS(CLOSE-REF(CLOSE,1)), 3,1)*100 VAR7:=100*(HHV(HIGH,27)-CLOSE)/(HHV(HIGH,27)-LLV(LOW,27)); VAR8:=INDEXC; VAR9:=MA(VAR8,6); VARA:=MA(VAR8,24); VARB:=MA(VAR8,32); VARC:=VARB VAR9*1.11ANDVARA VAR9*1.095; SSS:=(VAR3ANDVAR4AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1) -0.07ORVAR5 ANDVAR6ANDCROSS(VAR7,79)ORVARCANDCLOSE/COST(8) =0.8)*100; 抄底王:SSS 0,COLORWHITE,LINETHICK1; STICKLINE(SSS 0,0,6,6,0),COLORWHITE;[源码注释]通达信公式动态公式解读VAR18赋值:3*(收盘价-55日内最低价的最低值)/(55日内最高价的最高值-55日内最低价的最低值)*100的5日[1日权重]移动平均-2*(收盘价-55日内最低价的最低值)/(55日内最高价的最高值-55日内最低价的最低值)*100的5日[1日权重]移动平均的3日[1日权重]移动平均趋势赋值:VAR18的3日指数移动平均-10VAR19赋值:(收盘价的1日简单移动平均+收盘价的3日简单移动平均+收盘价的5日简单移动平均+收盘价的7日简单移动平均+收盘价的9日简单移动平均)/5VAR14赋值:(收盘价的2日简单移动平均+收盘价的4日简单移动平均+收盘价的6日简单移动平均+收盘价的8日简单移动平均+收盘价的10日简单移动平均)/5VAR16赋值:VAR19的2日指数移动平均-VAR14的5日指数移动平均和0的较大值*200VAR17赋值:VAR16的5日指数移动平均输出趋势线: 趋势,画白色,线宽为1如果趋势线 =1日前的趋势线,返回趋势线,否则返回无效数,画红色,线宽为2输出VAR0:收盘价的7日简单移动平均,画绿色输出VAR0A:如果VAR0 1日前的VAR0,返回VAR0,否则返回无效数,画红色推荐阅读:大盘抄底逃顶指标公式 RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; RSV2:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100; WEN:=3*SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1 )-2*SMA(SMA((CLOSE-LLV (LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1); J1:=SMA(RSV1,5,1);J2:=SMA(J1,5,1); W1:=SMA(RSV2,5,1);W2:=SMA(W1,5,1); 逃顶准备:IF(CROSS(J2,J1)ANDJ2 95,85,100),LINETHICK2,COLOR00FF00; 抄底准备:IF(WEN =5,5,0),LINETHICK2,COLORYELLOW; STICKLINE(WEN 95,100,80,1,0),COLORGREEN; STICKLINE(COUNT(WEN REF(WEN,5)AND WEN 6,2)=2,0,20,1,0),COLORRED; MA1:MA(CLOSE,5); MA2:MA(CLOSE,20); MA3:MA(CLOSE,120); MA4:MA(CLOSE,250); TY:=C; HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10); A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD)); T1:=BARSLAST(HD) BARSLAST(LD)ANDNOT(HD); T2:=BARSLAST(HD) BARSLAST(LD)ANDNOT(LD); {波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK2; STICKLINE(T1,A,A,9,0),COLORFF00FF; 波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;} VAR3:=LLV(H,240); VAR4:=100*(C-VAR3)/VAR3; VAR5:=(C-LLV(L,528))/(HHV(H,528)-LLV(L,528))*100; VAR6:=(C-LLV(L,530))/(HHV(C,530)-LLV(C,530))*100; VAR7:=0; VAR8:=MA(HHV(C-REF(C,1),0),34)/MA(ABS(C-REF(C,1)),7)*100; VAR9:=MA(HHV(C-REF(C,1),0),13)/MA(ABS(C-REF(C,1)),13)*100; VARA:=BARSCOUNT(C); VARB:=VAR8 20ANDVAR9 23ANDVARA VARC:=VARBANDCOUNT(VARB,1)=1; VARD:=EMA(C,21)-EMA(C,8); VARE:=EMA(VARD,5); VARF:=TROUGH(3,6,1) 4ANDCROSS(VARD,VARE); VAR10:=IF(TROUGH(3,16,1)=0ANDH L+0.04,4,0); VAR11:=ZIG(3,6) REF(ZIG(3,6),1)ANDREF(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)ANDREF(ZIG(3,6),1) =REF(ZIG(3,6),2)AND REF(ZIG(3,6),2) =REF(ZIG(3,6),3); VAR13:=ZIG(3,22) REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1) =REF(ZIG(3,22),2)AND REF(ZIG(3,22),2) =REF(ZIG(3,22),3); VAR14:=ZIG(3,22) REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1) =REF(ZIG(3,22),2)AND REF(ZIG(3,22),2) =REF(ZIG(3,22),3); VAR15:=ZIG(3,51) REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1) =REF(ZIG(3,51),2)AND REF(ZIG(3,51),2) =REF(ZIG(3,51),3); VAR16:=ZIG(3,51) REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1) =REF(ZIG(3,51),2)AND REF(ZIG(3,51),2) =REF(ZIG(3,51),3); VAR17:=ZIG(3,72) REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1) =REF(ZIG(3,72),2)AND REF(ZIG(3,72),2) =REF(ZIG(3,72),3); VAR18:=ZIG(3,72) REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1) =REF(ZIG(3,72),2)AND REF(ZIG(3,72),2) =REF(ZIG(3,72),3); 买点1:=VAR10; 买点2:=(VAR11+VAR13+VAR15+VAR17); 卖点1:=(VAR12+VAR14+VAR16+VAR18),LINETHICK2; DRAWTEXT(买点1 0,L-0.01, ▲ ),COLORRED; DRAWTEXT(买点2 0,L-0.01, ▲ ),COLORFF00FF; DRAWTEXT(卖点1 0,H+0.1, ▼ ),COLOR33FF33; N:=150;判断高低:=3; 高:=REF(HHV(H,N),判断高低); 近期顶:REFDATE(高,DATE),COLORGREEN,LINETHICK3; 最顶:=REFDATE(近期顶,DATE),NODRAW; 出:=最顶=HAND((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; 进:=最底=LAND((C+L) (O+C)OR(O+L) (C+O)),NODRAW; STICKLINE(进,C,O,3,0),COLORRED; STICKLINE(进,C,O,2,0),COLORRED; 指标 王:=COUNT(CROSS((HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),EMA(( CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5)),7) 0AND REF((HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),2) REF((HHV(HIGH,2 5)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),1) AND (HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5) REF((HHV(HIGH,25)-LLV( LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),1)AND COUNT(COUNT(CROSS((HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),E MA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5)),7) 0AND REF((HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),2) REF((HHV(HIGH,2 5)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),1)AND (HHV(HIGH,25)-LLV(LOW,25))/EMA((CLOSE-LLV(LOW,25)),5) REF((HHV(HIGH,25)-LLV( LOW,25))/EMA((CLOSE-LLV(LOW,25)),5),1),5)=1OR CROSS(EMA((((CLOSE-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10)))*4),4),0.3); DRAWTEXT(指标王,L*0.96, B ),COLORYELLOW; ZT:=C/REF(C,1) 1.097; BH:=BARSLAST(ZT-1000); STICKLINE(ZT,REF(O,BH),REF(C,BH),1,0),COLORYELLOW; 地域:DRAWTEXT_FIX(ISLASTBAR,0.94,0,1,DYBLOCK),COLORGRAY; 行业:DRAWTEXT_FIX(ISLASTBAR,0.95,0,0,HYBLOCK),COLORGRAY; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))_100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3_K-2_D; STICKLINE(REF(J,7)(0ANDJ)1,10,0,10,0),COLOR00FF00; VAR1:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW, 45))_100; VAR2:=SMA(VAR1,3,1); VAR3:=SMA(VAR2,3,1); N:=13;M:=5; VAR4:=3_SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW, 27))_100,5,1)-2_SMA(SMA((CLOSELLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))_100,5,1),3,1); VAR5:=CROSS(VAR4,10)ANDVAR3 抄底:IF(VAR5,90,1),COLORRED; DRAWICON(VAR5,65,1); DRAWTEXT(VAR5,30,‘抄底’),COLORYELLOW; 备钱:IF(CROSS(10,VAR4),40,1),COLORFF00FF; DRAWICON(CROSS(10,VAR4),45,1); DRAWTEXT(IF(CROSS(10,VAR4),1,0),20,‘$备钱’), COLORWHITE; 危机线:80,COLORRED,POINTDOT,LINETHICK2; 中间线:50,COLORFFCCCC,POINTDOT,LINETHICK2; 安全线:10,COLORFF00FF,POINTDOT,LINETHICK2; VAR6:=(2_CLOSE+HIGH+LOW)/4; VAR7:=LLV(LOW,M); VAR8:=HHV(HIGH,M); VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)_100,13); VARA:=EMA(0.667_REF(VAR9,1)+0.333_VAR9,2); 战术线:VAR9,COLORYELLOW,LINETHICK2; 战略线:EMA(0.382_REF(VAR9,2)+0.618_VAR9,12), COLORBLUE; STICKLINE(VAR9)VARA,VAR9,VARA,6,0),COLORRED; STICKLINE(VAR9(=VARA,VAR9,VARA,6,0),COLOR00FF00; VARB:=SUM(IF(CLOSE)REF(CLOSE,7),VOL,IF(CLOSE VARC:=SUMBARS(VOL,CAPITAL); VARD:=IF(CLOSE)LLV(CLOSE,VARC),1,-1); VARE:=IF(VARB)LLV(VARB,VARC),1,-1); VARF:=VARD_VARE; VAR10:=IF(VARF=-1,1,0);