通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、成交量堆量副图指标公式

  

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;  

K:SMA(RSV,3,1),COLORWHITE;  

D:SMA(K,2,1),COLORYELLOW;  

IF(K<15,K,DRAWNULL),COLORRED,LINETHICK2;  

IF(D<15,D,DRAWNULL),COLORRED,LINETHICK2;  

IF(K>85,K,DRAWNULL),COLORGREEN,LINETHICK2;  

IF(D>80,D,DRAWNULL),COLORGREEN,LINETHICK2;  

0,COLORYELLOW;  

15,COLORYELLOW,DOTLINE;  

80,COLORGREEN,DOTLINE;  

100,COLORGREEN,DOTLINE;  

{变色JJ线,取值933}  

{当JJ<0,加粗变白色,开始准备买,JJ上穿0,红箭头提示;当JJ>100,加粗变白色,开始准备卖。}  

RRSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,NODRAW;  

KK:SMA(RRSV,3,1),NODRAW;  

DD:SMA(KK,3,1),NODRAW;  

JJ:3*K-2*DD,COLORMAGENTA;  

DRAWICON(CROSS(JJ,1),JJ,1);  

DRAWICON(KK>80ANDDD>80ANDCROSS(DD,KK),DD,2);  

IF(JJ<0,JJ,DRAWNULL),COLORWHITE,LINETHICK2;  

IF(JJ>100,JJ,DRAWNULL),COLORWHITE,LINETHICK2;  

VAR2:=(HIGH-LOW);  

VAR3:=ABS((OPEN-CLOSE));  

VAR4:=(HIGH-IF((CLOSE>OPEN),CLOSE,OPEN));  

VAR5:=(IF((CLOSE>OPEN),OPEN,CLOSE)-LOW);  

VAR6:=((VAR3/VAR2)*VOL);  

VAR7:=((VAR4/VAR2)*VOL);  

VAR8:=((VAR5/VAR2)*VOL);  

QQ:=VAR6>=VAR7ANDVAR6>=VAR8ANDCLOSE<OPEN;  

MMM:=CLOSE<EMA(CLOSE,5)ANDQQ;  

JJJ:CLOSE>=EMA(CLOSE,5)ANDQQ;  

JJ:=VAR6>=VAR7ANDVAR6>=VAR8ANDCLOSE>OPEN;  

XX:VAR8>VAR6ANDVAR8>VAR7;  

MM:VAR7>VAR6ANDVAR7>VAR8;  

CDP:=REF(H+L+C,1)/3;  

PT:=REF(H,1)-REF(L,1);  

AH:=CDP+PT;  

NH:=CDP*2-REF(L,1);  

平衡:REF(H+L+C,1)/3,NODRAW;  

阻力二:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH),NODRAW;  

阻力一:IF(NH>阻力二,(阻力二-CDP)*0.618+CDP,NH),NODRAW;  

支撑一:CDP*2-REF(H,1),NODRAW;  

支撑二:CDP-REF(H-L,1),NODRAW;  

MAVOL5:MA(VOL,5),COLOREE00EE,LINETHICK2;  

MAVOL35:MA(VOL,35),COLOR00FFFF,LINETHICK2;  

实量:V,VOLSTICK;  

STICKLINE(JJ=1,0,实量*0.9,0.6,0),COLORYELLOW;  

STICKLINE(MM=1,0,实量*0.9,0.6,0),COLORMAGENTA;  

STICKLINE(XX=1,0,实量*0.9,0.6,0),COLORWHITE;  

STICKLINE(JJJ=1,0,实量*0.9,0.6,0),COLORGREEN;  

STICKLINE(MMM=1,0,实量*0.9,0.6,0),COLORBLUE;  

DRAWTEXT_FIX(1,0.01,0.05,0,'【加仓】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.05,0,'黄芯,庄家进货强,俺也进货等起航'),COLOR00FFFF,LINETHICK2;  

DRAWTEXT_FIX(1,0.01,0.15,0,'【高抛】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.15,0,'粉芯,庄家忙,高抛低吸,**逐浪'),COLORFF00FF,LINETHICK2;  

DRAWTEXT_FIX(1,0.01,0.25,0,'【洗盘】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.25,0,'白芯,庄家找底在洗盘,俺也伺机建点仓'),COLORFFFFFF,LINETHICK2;  

DRAWTEXT_FIX(1,0.01,0.35,0,'【莫痒】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.35,0,'绿芯,趋势破,离场急,比耐力,等止跌,莫手痒!'),COLORGREEN,LINETHICK2;  

DRAWTEXT_FIX(1,0.01,0.45,0,'【减仓】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.45,0,'蓝芯,巨量绿尾,庄家出逃慌,俺也赶快去减仓!'),COLORFF9900,LINETHICK2;  

DRAWTEXT_FIX(1,0.01,0.55,0,'【注意】')COLOR00FFFF;  

DRAWTEXT_FIX(1,0.1,0.55,0,'巨量下部有蓝色(大单流出)时,说明有主力出逃!'),COLOR00FF00,LINETHICK2;  

{VOLUME:=VOL,VOLSTICK;  

N:=51;  

M:=6;  

主力净买量:(LARGEINTRDVOL-LARGEOUTTRDVOL),LINETHICK3;}  

V2:=(H-L);  

V3:=ABS((O-C));  

V4:=(H-IF((C>O),C,O));  

V5:=(IF((C>O),O,C)-L);  

V6:=((V3/V2)*V);  

V7:=((V4/V2)*V);  

V8:=((V5/V2)*V);  

V9:=IF(((V/CAPITAL)>0.001),1,EXP(ABS(LOG(((V/CAPITAL)*100)))));  

VA:=(((C-MA(C,5))/MA(C,5))*100);  

VB:=(((MA(C,5)>MA(C,10))AND(MA(C,10)>MA(C,30)))AND(MA(C,30)>MA(C,60)));  

VC:=((MA(C,5)<MA(C,10))AND(MA(C,10)<MA(C,30)));  

逢高出货:DRAWTEXT(((((((((V7>V6)AND(VA>2))AND(V9>V8))AND(C>MA(C,5)))AND(C>MA(C,30)))AND(H>MA(C,60)))AND(V>MA(V,5)))AND(V7>=MA(V,5))),V,'▼逢高出货'),COLORF00FF0;  

逢低跟进:DRAWTEXT(((((((V8>V6)AND(V8>V7))AND(VA<(0-2)))AND(C<MA(C,30)))AND(V8<(MA(V,5)/2)))AND(MA(V,5)<MA(V,10))),V,'▼低进'),COLORFF00FF;  

强势参与:DRAWTEXT((((((V6>(MA(V,5)*2))AND(V6>=V7))AND(V6>=V8))AND(C>O))OR((V>(MA(V,5)*3))ANDVB)),V,'▼强势参与'),COLORCC99CC;  

空头释放:DRAWTEXT(((((((V6>=V7)AND(V6>=V8))AND(C<O))AND((V6/V)>0.7))ANDVC)AND(V6>MA(V,5))),(V6*2),'▼空头释放'),COLORF00FF0;  

VAR1:=MA(((WINNER((CLOSE*0.9))*100)*CLOSE),3);  

VAR2:=(IF((VAR1>10),VAR1,0)/2);  

DIFF:VAR2;  

DEA:MA(DIFF,2);  

DRAWICON(CROSS(DIFF,DEA),DIFF,1);  

DRAWICON(CROSS(DEA,DIFF),DEA,2);

image.png

二、成交量堆量选股指标

  

VAR1:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));  

成交:=VOL;  

买盘:=IF((CLOSE>OPEN),(VAR1*(HIGH-LOW)),IF((CLOSE<OPEN),(VAR1*((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));  

卖盘:=IF((CLOSE>OPEN),(0-(VAR1*((HIGH-CLOSE)+(OPEN-LOW)))),IF((CLOSE<OPEN),(0-(VAR1*(HIGH-LOW))),(0-(VOL/2))));  

买卖差:=(买盘+卖盘);  

STICKLINE((VOL>0),VOL,0,4,1),COLORFFFFFF;  

STICKLINE((买卖差>0),0,买卖差,4,0),COLOR0000FF;  

STICKLINE((买卖差<0),0,买卖差,2,0),LINETHICK3,COLOR33FF33;  

量比1:=(VOL/MA(VOL,5));  

VAR10:=买盘;  

VAR20:=卖盘;  

JX1:=BARSSINCE(买盘);  

JY1:=IF(((121>JX1)AND(JX1>0)),JX1,120);  

JY2:=IF(((4>JX1)AND(JX1>0)),JX1,3);  

VAR30:=MA(VOL,JY2);  

动神:=买盘;  

鬼力:=VAR20;  

神比:=(动神/VAR30);  

鬼比:=(鬼力/VAR30);  

VAR2:=(HIGH-LOW);  

VAR3:=ABS((OPEN-CLOSE));  

VAR4:=(HIGH-IF((CLOSE>OPEN),CLOSE,OPEN));  

VAR5:=(IF((CLOSE>OPEN),OPEN,CLOSE)-LOW);  

VAR6:=((VAR3/VAR2)*VOL);  

VAR7:=((VAR4/VAR2)*VOL);  

VAR8:=((VAR5/VAR2)*VOL);  

VAR9:=IF(((VOL/CAPITAL)>0.001),1,EXP(ABS(LOG(((VOL/CAPITAL)*100)))));  

VARA:=(((CLOSE-MA(CLOSE,5))/MA(CLOSE,5))*100);  

VARB:=(((MA(CLOSE,5)>MA(CLOSE,10))AND(MA(CLOSE,10)>MA(CLOSE,30)))AND(MA(CLOSE,30)>MA(CLOSE,60)));  

VARC:=((MA(CLOSE,5)<MA(CLOSE,10))AND(MA(CLOSE,10)<MA(CLOSE,30)));  

VARD:=REF(CLOSE,1);  

VARE:=((SMA(MAX((CLOSE-VARD),0),6,1)/SMA(ABS((CLOSE-VARD)),6,1))*100);  

VAR40:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),VAR6,动神)+动神)/2);  

VAR41:=((IF(((VAR7>VAR6)AND(VAR7>VAR8)),VAR7,动神)+动神)/2);  

VAR42:=((IF(((VAR8>VAR6)AND(VAR8>VAR7)),VAR8,动神)+动神)/2);  

VAR50:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),VAR6,鬼力)+鬼力)/2);  

三日上攻:=MA((((VAR40+VAR41)+VAR42)/3),JY2);  

三日下攻:=MA(VAR50,JY2);  

STICKLINE((CLOSE>MA(CLOSE,30)),0,VOL,4,1),COLOR0000FF;  

STICKLINE((CLOSE<MA(CLOSE,30)),0,VOL,4,1),COLOR00FF00;  

STICKLINE((鬼力>0),鬼力,0,4,0),COLORFF3399;  

STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),0,VAR6,2,0),COLOR00FFFF;  

STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),0,VAR6,2,0),COLORFF0000;  

STICKLINE(((VAR8>VAR6)AND(VAR8>VAR7)),0,VAR8,2,0),COLORFFFFFF;  

STICKLINE(((VAR7>VAR6)AND(VAR7>VAR8)),0,VAR7,2,0),COLORFF00FF;  

STICKLINE(((VAR9>2)AND(VOL<(MA(VOL,5)/2))),0,VOL,3,0);  

X_1:=(CLOSE+HIGH+LOW)/3;  

X_2:=EMA(X_1,10);  

X_3:=REF(X_2,1);  

X_4:=CROSS(X_2,X_3);  

X_5:=SMA(HIGH,21,2)*1.05;  

X_6:=SMA(LOW,21,2)*0.969;  

X_7:=MA(CLOSE,118);  

X_8:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;  

X_9:=SMA(X_8,3,1);  

X_10:=SMA(X_9,3,1);  

X_11:=3*X_9-2*X_10;  

X_12:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;  

X_13:=SMA(X_12,3,1);  

X_14:=SMA(X_13,3,1);  

X_15:=3*X_13-2*X_14;  

X_16:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;  

X_17:=SMA(X_16,3,1);  

X_18:=SMA(X_17,3,1);  

X_19:=3*X_17-2*X_18;  

X_20:=AMOUNT/VOL/100;  

X_21:=X_20>HIGHORX_20<LOW;  

X_22:=MA(CLOSE,8);  

X_23:=MA(CLOSE,21);  

X_24:=MA(CLOSE,8);  

X_25:=MA(CLOSE,12);  

X_26:=ATAN(X_24-REF(X_24,1))*3.1416*10;  

X_27:=ATAN(X_25-REF(X_25,1))*3.1416*10;  

X_28:=MA(CLOSE,13);  

X_29:=FILTER(CLOSE/OPEN>1.04ANDCLOSE-REF(CLOSE,1)>0ANDCLOSE>X_6ANDX_24-REF(X_24,1)>0ANDCLOSE<X_5,3);  

X_30:=CLOSE>REF(CLOSE,1)ANDREF(OPEN>=CLOSE,1);  

X_31:=21;  

X_32:=5;  

X_33:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),X_31);  

X_34:=SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),X_31);  

X_35:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),X_31);  

X_36:=100*(X_33*2+X_35)/(X_34*2+X_35);  

X_37:=MA(X_36,X_32);  

X_38:=CROSS(X_36,X_37);  

X_39:=X_37<100;  

X_40:=X_37<150ANDX_37>REF(X_37,1);  

X_41:=X_38ANDX_39;  

X_42:=X_38ANDX_40;  

X_43:=FILTER(X_41,5);  

X_44:=FILTER(X_42,8);  

X_45:=OPEN>REF(CLOSE,1)ANDCLOSE>REF(CLOSE,1);  

X_46:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;  

X_47:=SMA(X_46,2,1);  

X_48:=CROSS(X_47,20)ANDREF(CLOSE<OPEN,1)ANDX_45;  

X_49:=IF(X_48,2,0);  

X_50:=5;  

X_51:=4*SMA((CLOSE-LLV(LOW,X_50))/(HHV(HIGH,X_50)-LLV(LOW,X_50))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,X_50))/(HHV(HIGH,X_50)-LLV(LOW,X_50))*100,5,1),3.2,1);  

X_52:=8;  

X_53:=CROSS(X_51,X_52);  

牛股出世:X_4ANDX_29ANDX_49ANDX_53;  

image.png

[源码注释]通达信公式动态翻译结果

X_1赋值:(收盘价+最高价+最低价)/3

X_2赋值:X_1的10日指数移动平均

X_3赋值:1日前的X_2

X_4赋值:X_2上穿X_3

X_5赋值:最高价的21日[2日权重]移动平均*1.05

X_6赋值:最低价的21日[2日权重]移动平均*0.969

X_7赋值:收盘价的118日简单移动平均

X_8赋值:(收盘价-13日内最低价的最低值)/(13日内最高价的最高值-13日内最低价的最低值)*100

X_9赋值:X_8的3日[1日权重]移动平均

X_10赋值:X_9的3日[1日权重]移动平均

X_11赋值:3*X_9-2*X_10

X_12赋值:(收盘价-34日内最低价的最低值)/(34日内最高价的最高值-34日内最低价的最低值)*100

X_13赋值:X_12的3日[1日权重]移动平均

X_14赋值:X_13的3日[1日权重]移动平均

X_15赋值:3*X_13-2*X_14

X_16赋值:(收盘价-55日内最低价的最低值)/(55日内最高价的最高值-55日内最低价的最低值)*100

X_17赋值:X_16的3日[1日权重]移动平均

X_18赋值:X_17的3日[1日权重]移动平均

X_19赋值:3*X_17-2*X_18

X_20赋值:成交额(元)/成交量(手)/100

X_21赋值:X_20>最高价 OR X_20<最低价

X_22赋值:收盘价的8日简单移动平均

X_23赋值:收盘价的21日简单移动平均

X_24赋值:收盘价的8日简单移动平均

X_25赋值:收盘价的12日简单移动平均

X_26赋值:X_24-1日前的X_24的反正切*3.1416*10

X_27赋值:X_25-1日前的X_25的反正切*3.1416*10

X_28赋值:收盘价的13日简单移动平均

X_29赋值:收盘价/开盘价>1.04ANDCLOSE-1日前的收盘价>0ANDCLOSE>X_6ANDX_24-1日前的X_24>0ANDCLOSE<X_5的3日过滤

X_30赋值:收盘价>1日前的收盘价 AND 1日前的开盘价>=收盘价

X_31赋值:21

X_32赋值:5

X_33赋值:如果收盘价>1日前的收盘价,返回成交量(手),否则返回0的X_31日累和

X_34赋值:如果收盘价<1日前的收盘价,返回成交量(手),否则返回0的X_31日累和

X_35赋值:如果收盘价=1日前的收盘价,返回成交量(手),否则返回0的X_31日累和

X_36赋值:100*(X_33*2+X_35)/(X_34*2+X_35)

X_37赋值:X_36的X_32日简单移动平均

X_38赋值:X_36上穿X_37

X_39赋值:X_37<100

X_40赋值:X_37<150 AND X_37>1日前的X_37

X_41赋值:X_38 AND X_39

X_42赋值:X_38 AND X_40

X_43赋值:X_41的5日过滤

X_44赋值:X_42的8日过滤

X_45赋值:开盘价>1日前的收盘价 AND 收盘价>1日前的收盘价

X_46赋值:(收盘价-8日内最低价的最低值)/(8日内最高价的最高值-8日内最低价的最低值)*100

X_47赋值:X_46的2日[1日权重]移动平均

X_48赋值:X_47上穿20 AND 1日前的收阴线 AND X_45

X_49赋值:如果X_48,返回2,否则返回0

X_50赋值:5

X_51赋值:4*(收盘价-X_50日内最低价的最低值)/(X_50日内最高价的最高值-X_50日内最低价的最低值)*100的5日[1日权重]移动平均-3*(收盘价-X_50日内最低价的最低值)/(X_50日内最高价的最高值-X_50日内最低价的最低值)*100的5日[1日权重]移动平均的3.2日[1日权重]移动平均

X_52赋值:8

X_53赋值:X_51上穿X_52

输出牛股出世:X_4 AND X_29 AND X_49 AND X_53

推荐阅读:主图叠加成交量指标公式

  

MAXV:=CONST(HHV(VOL,21));  

MAXS:=CONST(HHV(HIGH,21));  

BS:=MAXV/MAXS;  

VOLUME:=VOL/BS*0.10;  

ORIGIN:=CONST(LLV(LOW,0))-CONST(0.5*HHV(VOLUME,0)),;  

STICKLINE(CLOSE>=OPEN,ORIGIN,ORIGIN+VOLUME,0.2,0),COLORRED;  

STICKLINE(CLOSE<OPEN,ORIGIN,ORIGIN+VOLUME,0.2,0),COLORGREEN;  

AA:=(C*2+H+L+O)/5;  

A0:=MA(C,5);  

A1:(EMA(AA,4)+MA(AA,8)+MA(AA,16))/3,COLORWHITE,LINETHICK2;  

A2:(EMA(AA,9)+MA(AA,18)+MA(AA,36))/3,COLORFF00FF,LINETHICK2;  

A3:(EMA(AA,13)+MA(AA,26)+MA(AA,52))/3,COLOR00FF00,LINETHICK2;  

A4:(EMA(AA,24)+MA(AA,48)+MA(AA,96))/3,COLOR0000FF,LINETHICK2;  

A5:=EMA(100*(C-LLV(L,100))/(HHV(H,100)-LLV(L,100)),5);  

A6:=A5/4;  

A7:=MAX(MAX(A1,A2),MAX(A3,A4));  

A8:=MIN(MIN(A1,A2),MIN(A3,A4));  

A9:=MIN(MIN(A1,A2),A3);  

A10:=MAX(MAX(A1,A2),A3);  

金叉:=CROSS(A2,A4)ANDA3>REF(A3,1)ANDA0>REF(A0,2)AND(A1-A4)/A4<0.02;  

穿四线:=FILTER(H>A7ANDL<A8ANDA1>REF(A1,1)ANDA2>REF(A2,1)ANDA4>REF(A4,2)AND(A7-A8)/A8<0.04ANDC>OAND(H-C)/(C-O)<0.4,3);  

圆弧底:=LONGCROSS(A1,A3,30)AND(A4-A3)/A3<0.05ANDA10<A4;  

双交叉:=LONGCROSS(A1,A2,15)ANDCROSS(A2,A3);  

三线粘合:=FILTER(A4>REF(A4,2)ANDREF(A1,3)<REF(A3,3)ANDC>OAND(A10-A9)/A9<0.005,5);  

DRAWICON(黄金叉OR双交叉OR穿四线OR三线粘合,L-0.1,9);  

DRAWICON(圆弧底,L-0.1,1);  

A3:=REF(C,2)/REF(C,3)>1.095;  

B3:=REF(V,1)/REF(V,2)<1.5ANDREF(C,1)<REF(C,2)ANDREF(C,1)<REF(O,1);  

D3:=C>REF(O,1);  

E3:=(C-LLV(C,100))/LLV(C,100)*100;  

叠加涨停:IF(A3ANDB3ANDD3ANDE3<50,100,0);  

VVV:=V/10000;VV:=EMA(VVV,3);  

DIFFV:EMA(VV,12)-EMA(VV,26),COLORWHITE;  

DEAV:EMA(DIFFV,9)COLORCYAN;  

MACDV:=DIFFV-DEAV,COLORSTICK;  

STICKLINE(MACDV>=0ANDMACDV>REF(MACDV,1),0,MACDV,3,0),COLORMAGENTA;  

STICKLINE(MACDV>=0ANDMACDV<REF(MACDV,1),0,MACDV,2,1),COLORYELLOW;  

STICKLINE(MACDV<0,0,MACDV,2,0),COLORFFCC33;  

STICKLINE(MACDV<0ANDMACDV>REF(MACDV,1),0,MACDV,3,0),COLORYELLOW;  

image.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。