通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、超短线买卖指标公式 VAR1C:=1; MA18:=MA(C,18); VAR2C:=(2*CLOSE+HIGH+LOW)/4; VAR3C:=IF(YEAR =2099ANDMONTH 2,0,1); VAR4C:=LLV(LOW,5); VAR5C:=HHV(HIGH,4); VAR1:=2*MA(LLV((C+L)/2,8)*1.1,13)-EMA((C+L)/2,3)-((C+L)/2)*0.1; VAR2:=IF((EMA((C+L)/2,3)-VAR1)*5 0,POW((EMA((C+L)/2,3)-VAR1)*5,2)/10,-1*POW((EMA((C+L)/2,3)-VAR1)*5,2)/10); VAR3:=IF(VAR2 0,VAR2-0,0); DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6); TJZB1:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLOR0080FF; TJZB2:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORGREEN; TJZB3:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORFF8000; TJZB4:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR00FFFF; VARR1:=CLOSE REF(CLOSE,1)ANDCLOSE REF(CLOSE,2); VARR2:=REF(VARR1,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR3:=REF(VARR2,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR4:=REF(VARR3,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR5:=REF(VARR4,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR6:=REF(VARR5,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); 启动线:=10*SUM(EMA((C+L)/2,2),5)/10.158,NODRAW; 平衡线:=10*LLV(SUM(EMA((C+L)/2,2),5)/10.158,4),NODRAW; 平台线:=10*LLV(SUM(EMA((C+L)/2,2),5)/10.158,10),NODRAW; 强弱线:=EMA(启动线,21); VARR7:=REF(VARR6,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR8:=REF(VARR7,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR9:=REF(VARR8,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARRA:=REF(VARR9,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); 散户:=EMA((VAR2C-VAR4C)/(VAR5C-VAR4C)*100,4)*VAR3C*VAR1C; 庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3C*VAR1C; VARRB:=REF(VARRA,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARRC:=REF(VARRB,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARRD:=CLOSE REF(CLOSE,1)ANDCLOSE REF(CLOSE,2); VARRE:=REF(VARRD,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARRF:=REF(VARRE,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); DRAWTEXT(CROSS(散户,庄家)AND散户 50AND29 散户,40, 短快进 ),COLOR00FF00; DRAWTEXT(CROSS(散户,庄家)AND散户 30,50, 低吸 ),COLOR3399CC; DRAWTEXT(CROSS(庄家,散户)AND散户 70,95, 高抛 ),COLORMAGENTA; 买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0); VARR10:=REF(VARRF,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR11:=REF(VARR10,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR12:=REF(VARR11,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR13:=REF(VARR12,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR14:=REF(VARR13,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR15:=REF(VARR14,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR16:=REF(VARR15,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR17:=REF(VARR16,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR18:=REF(VARR17,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2); VARR19:=REF(VARRDORVARREORVARRFORVARR10ORVARR11ORVARR12ORVARR13OR VARR14ORVARR15ORVARR16ORVARR17ORVARR18,1)ANDVARR1; 加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10; VARR1A:=REF(VARR1ORVARR2ORVARR3ORVARR4ORVARR5ORVARR6ORVARR7OR VARR8ORVARR9ORVARRAORVARRBORVARRC,1)ANDVARRD; DRAWTEXT(VARR19,20, 黄托底 ),COLORYELLOW; DRAWTEXT(VARR1A,80, 蓝压顶 ),COLORLICYAN; STICKLINE(VAR3 0ANDREF(VAR3,1)=0AND(C+L)/2 MA((C+L)/2,8),0,50,1,0),COLORYELLOW; DRAWTEXT(VAR3 0ANDREF(VAR3,1)=0AND(C+L)/2 MA((C+L)/2,8),50, 红色启动 跟:=IF(MA18 =REF(MA18,3)ANDCROSS(CLOSE,MA18),1,0); DRAWTEXT(MA18 =REF(MA18,3)ANDCROSS(CLOSE,MA18),LOW*0.96, 跟 ),COLOR7F52AF; m:=21; n:=21; DC:=INDEXC; DC1:=3; DV:=INDEXC; var11:=ZIG(DC1,6) REF(ZIG(DC1,6),1)ANDREF(ZIG(DC1,6),1) =REF(ZIG(DC1,6),2)ANDREF(ZIG(DC1,6),2) =REF(ZIG(DC1,6),3); var12:=ZIG(DC1,6) REF(ZIG(DC1,6),1)ANDREF(ZIG(DC1,6),1) =REF(ZIG(DC1,6),2)ANDREF(ZIG(DC1,6),2) =REF(ZIG(DC1,6),3); var13:=ZIG(DC1,22) REF(ZIG(DC1,22),1)ANDREF(ZIG(DC1,22),1) =REF(ZIG(DC1,22),2)ANDREF(ZIG(DC1,22),2) =REF(ZIG(DC1,22),3); var14:=ZIG(DC1,22) REF(ZIG(DC1,22),1)ANDREF(ZIG(DC1,22),1) =REF(ZIG(DC1,22),2)ANDREF(ZIG(DC1,22),2) =REF(ZIG(DC1,22),3); var15:=ZIG(DC1,51) REF(ZIG(DC1,51),1)ANDREF(ZIG(DC1,51),1) =REF(ZIG(DC1,51),2)ANDREF(ZIG(DC1,51),2) =REF(ZIG(DC1,51),3); var16:=ZIG(DC1,51) REF(ZIG(DC1,51),1)ANDREF(ZIG(DC1,51),1) =REF(ZIG(DC1,51),2)ANDREF(ZIG(DC1,51),2) =REF(ZIG(DC1,51),3); var17:=ZIG(DC1,72) REF(ZIG(DC1,72),1)ANDREF(ZIG(DC1,72),1) =REF(ZIG(DC1,72),2)ANDREF(ZIG(DC1,72),2) =REF(ZIG(DC1,72),3); var18:=ZIG(DC1,72) REF(ZIG(DC1,72),1)ANDREF(ZIG(DC1,72),1) =REF(ZIG(DC1,72),2)ANDREF(ZIG(DC1,72),2) =REF(ZIG(DC1,72),3); 买:=(var11+var13+var15+var17); 卖:=(var12+var14+var16+var18); 新价:DC,colorwhite;// DRAWTEXT(买 0,DC*0.99, 必进 ),colorred,; DRAWTEXT(卖 0,DC*1.02, 清仓 ),colorgreen,; b:=TROUGHBARS(DC1,5,1)=0; e:=PEAKBARS(DC1,5,1)=0; DRAWICON(b,INDEXL,1),colorred; DRAWICON(e,INDEXH,2); DRAWNUMBER(e,INDEXC*0.98,TOSTRING(INDEXH,2));//画数字 DRAWNUMBER(b,INDEXC*0.98,TOSTRING(INDEXL,2));//画数字 突破:REF(EMA(DC,14),1),coloryellow;// A1X:=(EMA(DC,10)-突破)/突破*100; 多方:=IF(A1X =0,REF(EMA(DC,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL); 空方:=IF(A1X 0,REF(EMA(DC,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL); STICKLINE(A1X =0,多方,突破,0,0),COLOR000099;//柱线 STICKLINE(A1X 0,空方,突破,0,0),COLOR00CC66;//柱线 均价线:SUM(DC*DV,240)/SUM(DV,240),colormagenta;// AA:=ZIG(DC1,5),coloryellow; DIFF1:=-(EMA(AA,26)-EMA(AA,12)); DEA1:=-(EMA(DIFF1,9)); MACD1:=2*(DIFF1-DEA1); //转向变盘建仓 X:=IF(MACD1 0ANDREF(MACD1,2) REF(MACD1,1)ANDMACD1 REF(MACD1,1),1,0); DRAWTEXT(X,INDEXC*0.97, 建仓 ),coloryellow; //量价指标 VPT:=SUM(DV/EMA(DV,N)*(DC-REF(DC,1))/REF(DC,1),0); MAVPT:=EMA(VPT,M); //均价线金叉 DRAWICON(CROSS(新价,均价线)AND新价 突破ANDCLOSE MA(CLOSE,144),均价线,1); DRAWICON(CROSS(突破,均价线),均价线,1); //底部 B:=ZIG(DC1,50/5),colorred; G:=MA(B,2),coloryellow; D:=CROSS(B,G)*(-0.5),STICK,colormagenta,LINETHICK3;// DRAWTEXT(D 0,INDEXC*0.95, 底部 ),coloryellow;二、超短线买卖点指标公式 VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5; VAR2:=LLV(LOW,21); VAR3:=HHV(HIGH,21); SK:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,5); SD:EMA(0.667*REF(SK,1)+0.333*SK,4); VAR4:=IF(CROSS(SD,SK)ANDSK =60,60,76); VAR5:=IF(CROSS(SK,20)ORCROSS(SK,SD)ANDSK 20,20,5); 买进:VAR5; 卖出:VAR4; 高抛:80,POINTDOT; 低吸:20,POINTDOT; 强弱:50,POINTDOT; VAR6:=LLV(LOW,55); VAR7:=HHV(HIGH,34); VAR8:=EMA((VAR1-VAR6)/(VAR7-VAR6)*100,3); VAR9:=(SK+VAR8)/2; VARA:=EMA(0.667*REF(VAR8,1)+0.333*SK,2); VARB:=EMA(VAR9,5); VARC:=EMA(0.667*REF(VARB,1)+0.333*VARB,2); IF(VARB =40,20,0); M:=24; A:=5; RSV:=((HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M))*200)-125; 空方主力:SMA(RSV,A,1); RSV1:=((CLOSE-LLV(LOW,M))/(HHV(HIGH,M)-LLV(LOW,M))*200)-105; 多方主力:SMA(RSV1,A,1); WD:=CROSS(空方主力,-85); WD1:=CROSS(空方主力,多方主力); VAR1A:=ZIG(CLOSE,13); 买入确认:IF(REF(VAR1A,2) REF(VAR1A,1)ANDVAR1A REF(VAR1A,1),0,-70),COLORRED; 卖出确认:IF(REF(VAR1A,2) REF(VAR1A,1)ANDVAR1A REF(VAR1A,1),0,40); 趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW; STICKLINE(趋势 50,趋势,50,2,0),COLORRED; STICKLINE(趋势 50,趋势,50,2,0),COLORGREEN; 温度值:(C-LLV(C,21))/(HHV(C,21)-LLV(C,21))*100; VOLUME:VOL,VOLSTICK; VAR1:=VOL/((H-L)*2-ABS(C-O)); 主买:IF(C O,VAR1*(H-L),IF(C O,VAR1*((H-O)+(C-L)),VOL/2)),COLORRED,LINETHICK0; 主卖:IF(C O,0-VAR1*((H-C)+(O-L)),IF(C O,0-VAR1*(H-L),0+V/2)),COLOR00FF00,LINETHICK0; DDX:=主买+主卖; DX:=MA(DDX,5)*5; DDX1:SMA(DX,3,1),COLORRED,LINETHICK1; DDX2:SMA(DDX1,3,1),COLORYELLOW,LINETHICK1; DDX3:EMA(DDX2,5),COLORF0F000,LINETHICK1; X1:=(3*C+L+H+O)/6; F:=(EMA(CLOSE,5)-EMA(CLOSE,21))*4; VAR10:=C=HHV(C,4)ANDREF(C,1)=LLV(C,4); VAR20:=C=LLV(C,4)AND(REF(C,1) REF(C,2)ORREF(C,1) REF(C,3))ORREF(C,1)=LLV(C,4)ANDC REF(C,2)ORREF(C,2)=LLV(C,4)ANDREF(C,1)=HHV(C,4)ANDC REF(C,1)ORREF(C,3)=LLV(C,4)ANDC REF(C,1)ANDC REF(C,2); VAR30:=REF(C,1)=LLV(C,4)ANDC =REF(C,2)ORREF(C,2)=LLV(C,4)ANDREF(C,1) =REF(C,3)ANDREF(C,2) REF(C,4)ANDC =REF(C,1); VAR40:=(20*X1+19*REF(X1,1)+18*REF(X1,2)+17*REF(X1,3)+16*REF(X1,4)+15*REF(X1,5)+ 14*REF(X1,6)+13*REF(X1,7)+12*REF(X1,8)+11*REF(X1,9)+10*REF(X1,10)+9*REF(X1,11)+8*REF(X1,12) +7*REF(X1,13)+6*REF(X1,14)+5*REF(X1,15)+4*REF(X1,16)+3*REF(X1,17)+2*REF(X1,18)+REF(X1,20))/210; MTM:=C-REF(C,1); DX1:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6); CB:=EMA(VAR40,13); 卖1:=HHV(DX1,2)=HHV(DX1,7)ANDCOUNT(DX1 50,2)ANDCROSS(MA(DX1,2),DX1); DRAWTEXT(FILTER(卖1=1,1),VOLUME*-0.1, 卖 ),COLOR00C800; 买1:=LLV(DX1,2)=LLV(DX1,7)ANDCOUNT(DX1 0,2)ANDCROSS(DX1,MA(DX1,2)); DRAWTEXT(FILTER(DDX1 =DDX2AND买1=1,5),VOLUME*-0.1, 买 ),COLORYELLOW; LC:=REF(CLOSE,1); RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100); HD:=(HIGH-REF(HIGH,1)); LD:=(REF(LOW,1)-LOW); DMP:=SUM(IF(((HD 0)AND(HD LD)),HD,0),10); DMM:=SUM(IF(((LD 0)AND(LD HD)),LD,0),10); PDI:=((DMP*100)/TR); MDI:=((DMM*100)/TR); ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5); WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10))); 趋势线:=(2*RSI5+ADX-WR10);[源码注释]通达信公式动态公式解读VAR1赋值:获利盘为89%的成本分布-获利盘为11%的成本分布VAR2赋值:获利盘为99.9%的成本分布-获利盘为0.1%的成本分布单峰赋值:(1-VAR1/VAR2)*100赢利赋值:以成交额(元)/成交量(手)/99计算的获利盘比例*100的2日[1日权重]移动平均输出突破:赢利上穿单峰推荐阅读:超短线精准买卖指标 X1:=REF(CLOSE,1); X2:=SMA(MAX(CLOSE-X1,0),6,1)/SMA(ABS(CLOSE-X1),6,1)*100; ENTERLONG:=CROSS(X2,20); X3:=CROSS(X2,20); XG:CROSS(X2,20); AA:=VOL/((H-L)*2-ABS(C-O)); 买量:=AA*(H-L); 卖量:=0-AA*((H-C)+(O-L)); 进出量:=(买量+卖量) AA1:=FILTER(L=LLV(L,13),8); AA2:=IF(LLV(L,3)=LLV(L,13)ANDC REF((H+L)/2,1),MAX(REF(LLV(L,12),BARSLAST(AA1)+1)-L,0),0); AA3:=EMA(AA2,3)*10; AA4:=SUMBARS(AA3 0,21); AA5:=SUM(AA3,AA4)/21; AA6:=REF(AA3,1)=HHV(AA3,3)ANDREF(AA3,1) AA5*3ANDCOUNT(C/REF(C,1) 0.9025,8)=0ANDLLV(L,3)/HHV(H,18) 0.88; 均线条件:=EMA(C,5) =REF(EMA(C,5),1);{增加这个条件过滤掉那些股票价格继续下行,而出现信号} 反转:=FILTER(AA6AND进出量AND均线条件,3);{增加了过滤信号语句,减少重复信号} STICKLINE(CLOSE,0,AA3,3,0),COLORRED; STICKLINE(反转,0,AA3,3,0),COLORYELLOW; VAR1:=-1; VAR3:=MA(CLOSE,13); VAR4:=100-ABS((CLOSE-VAR3)/VAR3*10); VAR5:=LLV(LOW,75); VAR6:=HHV(HIGH,75); VAR7:=(VAR6-VAR5)/100; VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1); VAR9:=SMA((OPEN-VAR5)/VAR7,20,1); VARA:=3*VAR8-2*SMA(VAR8,15,1); VARB:=3*VAR9-2*SMA(VAR9,15,1); VARC:=100-VARB; 主力趋向:(10-VARA)*VAR1,COLOR0000FF; VARD:=主力趋向 VAR4; VARE:=REF(LOW,1)*0.9; VARF:=LOW*0.9; VAR11:=EMA(VARF,30); VAR12:=CLOSE-REF(CLOSE,1); VAR13:=MAX(VAR12,0); VAR14:=ABS(VAR12); VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*10; VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*10; VAR17:=BARSCOUNT(CLOSE); VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*10; VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*10; VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1); VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*10; VAR1D:=SMA(VAR1C,5,1); VAR1E:=SMA(VAR1D,3,1); VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*10; VAR20:=VAR18 =25ANDVAR19 -95ANDVAR1F 20ANDVAR1B -30ANDVAR1E 30ANDVAR11-CLOSE =-0.25ANDVAR15 22ANDVAR16 28ANDVAR17 STICKLINE(VARD,VAR4,主力趋向,1,0),COLOR0099FF; 顶部预警线:88,COLOR86FF86,LINETHICK2; 高危线:100,COLOR376F00,LINETHICK3; 转折线:0,COLOR00CACA,LINETHICK2; 底部线:20,COLORWHITE,LINETHICK2; 中轴:50,COLORRED,POINTDOT,LINETHICK4; DIF:(EMA(C,5)-EMA(C,60))/EMA(C,60)*300,COLOR0063C6; DEA:(EMA(C,10)-EMA(C,60))/EMA(C,60)*300; MACD:(DIF-DEA)*2,COLORSTICK; P1:=5; P2:=4; 80,POINTDOT; 20,POINTDOT; VAR1:=LLV(LOW,P1); VAR2:=HHV(HIGH,P1); K:EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,P2),COLORFF9900,; D:EMA(0.667*REF(K,1)+0.333*K,2),,; VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1); VARD:=EMA(IF(C EMA(C,250),VARC*1000,VARC*10),3); 火焰山:EMA(IF(L =LLV(L,30),VARD/2+HHV(VARD,30),0),3)/618; STICKLINE(火焰山 100,0,火焰山*1.2,8,0); STICKLINE(火焰山 100,0,火焰山,4,1);每日公式解答:1、时间操作法则:当个股从底部起涨到一定高度时(通常是20%以上),会缩量整理5-7个交易日,此时量能萎缩较为明显,股价并未下沉太多,可在第5个交易日左右逢低买进。2、空间交易法则:当个股从底部起涨到一定高度时(通常是20%以上),股价调整到前期上升幅度的35%-40%左右,是一个绝佳的短线买点。