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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、短线买卖指标公式无未来

  

散户线:100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORGREEN,LINETHICK2;  

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

K:=SMA(RSV,5,1);  

D:=SMA(K,3,1);  

J:=3*K-2*D;  

主力线:EMA(J,6),COLORRED,LINETHICK2;  

VAR2:=REF(LOW,1);  

VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;  

VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);  

VAR5:=LLV(LOW,30);  

VAR6:=HHV(VAR4,30);  

VAR7:=IF(MA(CLOSE,58),1,0);  

VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;  

VAR9:=IF(VAR8>100,100,VAR8);  

吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;  

AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;  

AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;  

AA5:=SMA(AA4,13,8);  

走势:CEILING(SMA(AA5,13,8)),COLORFF00FF;  

AA6:=SMA(AA3,21,8);  

买观注:STICKLINE(走势-AA6<-65,0,7,15,1);  

DRAWICON(FILTER(J>REF(J,1)AND走势>=REF(走势,1)AND走势<25,5),走势,3);  

卖观注:STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;  

DRAWICON(FILTER(J<REF(J,1)AND走势<=ref(走势,1)andj>85,5),J,6);  

金叉:CROSS(主力线,散户线);  

DRAWTEXT(金叉,主力线,'★'),COLORRED;  

死叉:CROSS(散户线,主力线);  

DRAWTEXT(死叉,散户线,'☆'),COLOR00F300;  

HJ_1:=BETWEEN(MA(CLOSE,5),CLOSE,OPEN)ANDBETWEEN(MA(CLOSE,10),CLOSE,OPEN)ANDBETWEEN(MA(CLOSE,30),CLOSE,OPEN)ANDCAPITAL<800000000andclose>OPENAND(CLOSE/MA(CLOSE,24)-1)*100>=2.1ANDMA(CLOSE,5)>EMA(CLOSE,89);  

HJ_2:=MA(CLOSE,5)>EMA(CLOSE,120)ANDMA(CLOSE,10)>EMA(CLOSE,89)ANDMA(CLOSE,10)>EMA(CLOSE,120)ANDMA(CLOSE,30)>EMA(CLOSE,89)ANDMA(CLOSE,30)>EMA(CLOSE,120);  

HJ_3:=VOL/MA(VOL,5)>0.3ANDMA(CLOSE,5)>MA(CLOSE,55)ANDMA(CLOSE,10)>MA(CLOSE,55)ANDEMA(CLOSE,8)>EMA(CLOSE,13)ANDEMA(CLOSE,13)>EMA(CLOSE,24)ANDMA(CLOSE,5)>MA(CLOSE,30)ANDMA(CLOSE,10)>MA(CLOSE,30);  

HJ_4:=MA(CLOSE,8)>MA(CLOSE,24)ANDMA(VOL,5)>MA(VOL,20)ANDMA(VOL,5)>MA(VOL,60)AND(LOW-MA(CLOSE,30))/MA(CLOSE,24)*100>(-2.5)AND(LOW-MA(CLOSE,30))/MA(CLOSE,30)*100<0ANDBETWEEN(MA(CLOSE,30),LOW,HIGH);  

EE:=HJ_1ANDHJ_2ANDHJ_3ANDHJ_4,COLORFF00FF;  

选:=EE;  

HJ_11:=BETWEEN(MA(CLOSE,5),CLOSE,OPEN)ANDBETWEEN(MA(CLOSE,10),CLOSE,OPEN)ANDBETWEEN(MA(CLOSE,24),CLOSE,OPEN)ANDCAPITAL<800000000andclose>OPENAND(CLOSE/MA(CLOSE,24)-1)*100>=2.1ANDMA(CLOSE,24)>EMA(CLOSE,89);  

HJ_22:=MA(CLOSE,24)>EMA(CLOSE,120)ANDMA(CLOSE,5)>EMA(CLOSE,89)ANDMA(CLOSE,5)>EMA(CLOSE,120)ANDMA(CLOSE,10)>EMA(CLOSE,89)ANDMA(CLOSE,10)>EMA(CLOSE,120);  

HJ_33:=VOL/MA(VOL,5)>0.3ANDMA(CLOSE,5)>MA(CLOSE,55)ANDMA(CLOSE,10)>MA(CLOSE,55)ANDEMA(CLOSE,8)>EMA(CLOSE,13)ANDEMA(CLOSE,13)>EMA(CLOSE,24)ANDMA(CLOSE,5)>MA(CLOSE,30)ANDMA(CLOSE,10)>MA(CLOSE,30);  

HJ_44:=MA(CLOSE,8)>MA(CLOSE,24)ANDMA(VOL,5)>MA(VOL,20)ANDMA(VOL,5)>MA(VOL,60)AND(LOW-MA(CLOSE,24))/MA(CLOSE,24)*100>(-2.5)AND(LOW-MA(CLOSE,24))/MA(CLOSE,24)*100<0ANDBETWEEN(MA(CLOSE,24),LOW,HIGH);  

EEE:=HJ_11ANDHJ_22ANDHJ_33ANDHJ_44;  

选1:=EEE;  

HJ_111:=BETWEEN(EMA(CLOSE,8),CLOSE,OPEN)ANDBETWEEN(EMA(CLOSE,13),CLOSE,OPEN)ANDBETWEEN(EMA(CLOSE,24),CLOSE,OPEN)ANDCAPITAL<800000000andclose>OPENAND(CLOSE/MA(CLOSE,24)-1)*100>=2.1ANDMA(CLOSE,24)>EMA(CLOSE,89);  

HJ_222:=MA(CLOSE,24)>EMA(CLOSE,120)ANDMA(CLOSE,5)>EMA(CLOSE,89)ANDMA(CLOSE,5)>EMA(CLOSE,120)ANDMA(CLOSE,10)>EMA(CLOSE,89)ANDMA(CLOSE,10)>EMA(CLOSE,120);  

HJ_333:=VOL/MA(VOL,5)>0.3ANDMA(CLOSE,5)>MA(CLOSE,55)ANDMA(CLOSE,10)>MA(CLOSE,55)ANDMA(CLOSE,5)>MA(CLOSE,30)ANDMA(CLOSE,5)>MA(CLOSE,10)ANDMA(CLOSE,30)>MA(CLOSE,55)ANDMA(CLOSE,10)>MA(CLOSE,30)ANDMA(VOL,5)>MA(VOL,20)ANDMA(CLOSE,8)>MA(CLOSE,24)ANDMA(VOL,5)>MA(VOL,40)ANDMA(VOL,5)>MA(VOL,60)AND(LOW-EMA(CLOSE,24))/EMA(CLOSE,30)*100>(-2.5)AND(LOW-EMA(CLOSE,24))/EMA(CLOSE,24)*100<0ANDBETWEEN(EMA(CLOSE,24),LOW,HIGH);  

EEEE:=HJ_111ANDHJ_2ANDHJ_333;  

选2:=EEEE;  

和:选OR选1OR选2;  

H1:=MAX(DYNAINFO(3),DYNAINFO(5));  

L1:=MIN(DYNAINFO(3),DYNAINFO(6));  

P1:=H1-L1;  

阻力:=L1+P1*7/8,COLORGREEN;  

支撑:=L1+P1*0.5/8,COLORRED;  

中线:=(支撑+阻力)/2,COLORWHITE,POINTDOT;  

V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);  

趋势线:EMA(V11,3),LINETHICK1,COLORYELLOW;  

V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;  

准备买入:STICKLINE(趋势线<11,趋势线,11,5,0),COLORRED;  

AA:=(趋势线<11)ANDFILTER((趋势线<=11),15)ANDC<中线;  

BB0:=REF(趋势线,1)<11ANDCROSS(趋势线,11)ANDC<中线;  

BB1:=REF(趋势线,1)<11andref(趋势线,1)>6ANDCROSS(趋势线,11);  

BB2:=REF(趋势线,1)<6andref(趋势线,1)>3ANDCROSS(趋势线,6);  

BB3:=REF(趋势线,1)<3andref(趋势线,1)>1ANDCROSS(趋势线,3);  

BB4:=REF(趋势线,1)<1andref(趋势线,1)>0ANDCROSS(趋势线,1);  

BB5:=REF(趋势线,1)<0ANDCROSS(趋势线,0);  

BB:=BB1=1ORBB2=1ORBB3=1ORBB4=1ORBB5=1;  

下单买入:STICKLINE(BB=1ANDC<中线,11,52,1,0),COLORRED;  

DRAWICON(BB=1ANDC<中线,55,1);  

DRAWTEXT(BB0,60,'★抄底'),COLORRED;  

DRAWTEXT(AA,16,'超卖见底'),,COLORWHITE;  

准备卖出:STICKLINE(趋势线>89,趋势线,89,5,0),COLORGREEN;  

CC:=(趋势线>89)ANDFILTER((趋势线>89),15)ANDC>中线;  

DD0:=REF(趋势线,1)>89ANDCROSS(89,趋势线)ANDC>中线;  

DD1:=REF(趋势线,1)>89ANDREF(趋势线,1)<94ANDCROSS(89,趋势线);  

DD2:=REF(趋势线,1)>94ANDREF(趋势线,1)<97ANDCROSS(94,趋势线);  

DD3:=REF(趋势线,1)>97ANDREF(趋势线,1)>99ANDCROSS(97,趋势线);  

DD4:=REF(趋势线,1)>99ANDREF(趋势线,1)<100ANDCROSS(99,趋势线);  

DD5:=REF(趋势线,1)>100ANDCROSS(100,趋势线);  

DD:=DD1=1ORDD2=1ORDD3=1ORDD4=1ORDD5=1;  

下单卖出:STICKLINE(DD=1ANDC>中线,89,49,1,0),COLORGREEN;  

DRAWICON(DD=1ANDC>中线,55,2);  

DRAWTEXT(DD0,40,'★逃顶'),COLORGREEN;  

DRAWTEXT(CC,84,'超买见顶'),,COLORWHITE;  

顶:89,COLORGREEN;  

底:11,COLORRED;  

中:50,POINTDOT,COLORWHITE;  

DRAWTEXT(ISLASTBAR,顶,'顶'),COLORGREEN;  

DRAWTEXT(ISLASTBAR,底,'底'),COLORRED;  

DRAWTEXT(ISLASTBAR,中,'中'),COLORWHITE;

image.png

二、期货短线指标公式无未来

  

MA5:=EMA(C,5);  

MA20:=EMA(C,20);  

MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;  

MA20角度:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416;  

MA20角度变化率:=ATAN((MA20角度/REF(MA20角度,1)-1)*100)*180/3.1416;  

价角5:MA5角度*10,coloryellow,LINETHICK2;  

价角20:MA20角度*10,colorred,linethick3;  

买入线:VERTLINE(cross(价角5,价角20),0),colorred;  

买入:cross(价角5,价角20)*50,colorred;  

卖出线:VERTLINE(cross(-价角5,-价角20),0),colorgreen;  

卖出:IF(cross(-价角5,-价角20)AND价角5<0,-50,0),colorgreen;  

二十均线角变率:MA20角度变化率*3,colorffff00;  

STICKLINE(CROSS(MA5角度,0)AND二十均线角变率<0,0,500,3,0),COLORyellow;  

STICKLINE((CROSS(MA5角度,MA20角度)ANDMA20角度>0)ORCROSS(MA20角度,0),0,400,3,0),COLORRED;  

STICKLINE(CROSS(-MA5角度,0)AND二十均线角变率<0,0,-500,3,0),COLORFFFF00;  

STICKLINE((CROSS(-MA5角度,-MA20角度)ANDMA20角度<0)ORCROSS(-MA20角度,0),0,-400,3,0),COLORff00ff;  

cc:0,linethick2,COLORffffff;  

uu:450,linethick2,colorff00ff;  

TJ1:=CLOSE>MA(CLOSE,20);  

TJ2:=CLOSE<MA(CLOSE,3);  

TJ3:=BARSLAST(MA(C,20)0;  

N:=5;  

M1:=6;  

M2:=6;  

M3:=8;  

R:=IF(DATE<1900612,1,0);  

EE:=(H+MAX(C,O))/2;  

EE1:=MA(EE,3);  

EE2:=(L+MIN(C,O))/2;  

EE3:=MA(EE2,3);  

超短生命线:=MA(EE,3);  

FF:=(H+L+C+O)/4,COLORWHITE;  

FF1:=MA(FF,3),COLORGREEN;  

FF3:=REF((C+O)/2,1)>REF((C+O)/2,2)ANDREF(MIN(C,O),1)>REF(MAX(C,O),2);  

实际乖离:=(MAX(FF,FF1)-MIN(FF,FF1))/MIN(FF,FF1)*100,LINETHICK;  

FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;  

FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;  

FF6:=FF1-(REF(FF1,1)-FF1);  

FF7:=EE1+(EE1-REF(EE1,1));  

期望获利率:=IF(FF3,FF5,FF4),LINETHICK;  

YY1:=REF(EVERY(C>=O,4),1)ANDREF(EVERY((C+O)/2>FF1,4),1)AND(C+O)/2<FF1;  

YY2:=NOT(YY1)AND(FF1-O)/O*1000>5ANDO<REF(MIN(C,O),1);  

A:=SMA(L,4,3);  

B:=SMA(H,4,3);  

BB:=SMA(MIN(C,O),4,3);  

BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);  

BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);  

BB3:=L<=bb1+bb1*0.01ando>REF(O,2)ANDO>=REF(L,3)ANDCOUNT(C>O,7)>3;  

BB6:=(BB1-L)/L*100;  

BB7:=(REF(L,1)-BB1)/BB1*100;  

A1:=(A-L)/L>N/1000;  

A8:=A1;  

A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100;  

A10:=IF(BB2,BB6,A9);  

BB4:=BB6+A10>2;  

BB5:=IF(BB2,BB3,BB4)AND期望获利率>2;  

D5:=RANDA8ANDBB5;  

买进3:=(REF((D5),1)AND(L<REF((L/0.995),1)));  

AA:=LLV(DMA(CLOSE,VOL/CAPITAL),120);  

龙抬头4:=200*(CLOSE-AA)/AA>35;  

共振XG:TJ1ANDTJ2ANDTJ3AND买进3AND龙抬头4;

image.png

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

VV1赋值:1日前的收盘价

VV2赋值:收盘价-VV1和0的较大值的7日[1日权重]移动平均/收盘价-VV1的绝对值的7日[1日权重]移动平均*100

VV3赋值:79上穿VV2

AAA赋值:5日前的收盘价<5日前的开盘价 AND 4日前的收盘价<4日前的开盘价 AND 3日前的收盘价<3日前的开盘价

输出买点:如果(AAAAND(收阳线,2))OR(AAAANDC>OANDREF(收盘价,1)<1日前的开盘价andref(收盘价,2)>2日前的开盘价)的10日过滤,返回1,否则返回0,画红色

输出卖点:如果VV3,返回1,否则返回0,画绿色

推荐阅读:超级短线买卖点指标公式

  

AA:=CLOSE>MA(CLOSE,20)ANDCLOSE<MA(CLOSE,3)ANDCOUNT(V<REF(V,1),3)=3;  

A:=LLV(DMA(CLOSE,VOL/CAPITAL),120);  

龙抬头:=200*(CLOSE-A)/A>35;  

TJ1:=BARSLAST(MA(C,20)0;  

XG:AAAND龙抬头ANDTJ1;  

GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));  

GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));  

GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));  

GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));  

A:=BARSLAST(CROSS(50,GJTJ1))<3ANDBARSLAST(CROSS(GJTJ1,50))<3andgjtj1>65;  

B:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2ANDBARSLAST(CROSS(GJTJ1,GJTJ4))<2andgjtj1>GJTJ4;  

JRS:=DRAWICON(AANDB,GJTJ1,9);  

XG:CROSS(JRS,0.8);  

REFLINE:0;  

DIFF:=EMA(CLOSE,3)-EMA(CLOSE,8);  

DEA:=EMA(DIFF,5);  

MACD:=2*(DIFF-DEA);  

X1:=EMA(DIFF,5)*5;  

X2:=((EMA(CLOSE,3)-EMA(CLOSE,8)))*5;  

X3:IF(X2>0,X2,0),POINTDOT,COLORRED;  

X4:IF(X2<0,X2,0),POINTDOT,COLORGREEN;  

STICKLINE(X2>0,0,X2,2.8,0),COLORRED;  

STICKLINE(X2>0,0,X2,2.8,0),COLOR000088;  

STICKLINE(X2>0,0,X2,2.6,0),COLOR000099;  

STICKLINE(X2>0,0,X2,2.4,0),COLOR0000AA;  

STICKLINE(X2>0,0,X2,2.2,0),COLOR0000BB;  

STICKLINE(X2>0,0,X2,2,0),COLOR0000CC;  

STICKLINE(X2>0,0,X2,1.8,0),COLOR0000DD;  

STICKLINE(X2>0,0,X2,1.5,0),COLOR0000EE;  

STICKLINE(X2>0,0,X2,1.0,0),COLOR0000FF;  

STICKLINE(X2>0,0,X2,0.0,0),COLOR0000FF;  

STICKLINE(X2<0,0,X2,2.8,0),COLORGREEN;  

STICKLINE(X2<0,0,X2,2.8,0),COLOR007700;  

STICKLINE(X2<0,0,X2,2.6,0),COLOR008800;  

STICKLINE(X2<0,0,X2,2.6,0),COLOR009900;  

STICKLINE(X2<0,0,X2,2.4,0),COLOR00BB00;  

STICKLINE(X2<0,0,X2,2.0,0),COLOR00CC00;  

STICKLINE(X2<0,0,X2,1.8,0),COLOR00DD00;  

STICKLINE(X2<0,0,X2,1.5,0),COLOR00EE00;  

STICKLINE(X2<0,0,X2,1,0),COLOR00FF00;  

STICKLINE(X2<0,0,X2,0,0),COLOR00FF00;  

资金动能A:X2,COLORYELLOW,LINETHICK2;  

资金动能B:X1,COLORFFFF00,LINETHICK2;  

DRAWICON((CROSS(资金动能A,资金动能B)AND资金动能B<-0.25),资金动能B,5);  

DRAWICON((CROSS(资金动能B,资金动能A)AND资金动能A>0.25),资金动能A,6);

image.png

每日公式解答:

在股市中盈利模式远比资金重要。例如,一万元若连赚50个10%,在满仓连赢50次后,一万元将变成117万。反之,从100万起步,连输50个10%,最终只剩5153元。显然,连续稳定的盈利是关键。我们都应该不断总结发展自己的高胜算盈利模式,然后要做的事就是重复简单的操作。下面介绍一种短线盈利模式,主要涉及到黄金分割线。

黄金分割线是利用黄金分割比率进行的切线画法。在行情发生转势后,以近期走势中重要的高点和低点之间的涨跌额作为计量的基数,将原涨跌幅按0.191、0.382、0.618、0.809分割为4个黄金点,股价在反转后的走势将可能在这些黄金分割点上遇到暂时的阻力或支撑。黄金分割的原理源自弗波纳奇神奇数字即大自然数。0.6180339……是众所周知的黄金分割比率,据此推算出0.191、0.382、0.809等,其中黄金分割线中运用最经典的数字为0.382、0.618,这两条线极易产生支撑与压力。
在运用黄金分割线时,需要找到某段行情的起点与终点。在一个上升行情中,从某一点开始逐步盘升,在某一价位受阻而掉头向下,那么判断这波下跌行情会到何处就显得极为重要。运用黄金分割线可判断,价格回档第一个目标便是该上升段高度的0.382处,如果在此止跌,便会展开新一轮的上升。价格回档第二个目标一般来说是0.5。上涨回调的最大幅度是0.618黄金分割线,这是黄金分割线中最重要的一条,它不仅显示了上涨回调的极限位置,还决定回调是属于上涨中的调整还是下跌趋势的开始。若0.618黄金分割线无法阻止市场下跌的步伐,那么这轮回调的性质就会因此而改变,取而代之的是个股的横盘或下跌,可见0.618线的重要性。

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