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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信买卖点指标公式源码

  

N:=9;  

M1:=3;  

M2:=3;  

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;  

买入:REF(K,1)<20ANDCROSS(J,K)ANDDYNAINFO(14)>0.0158,COLORRED;  

V1:=BARSCOUNT(CLOSE)*3.142/180;  

A2:SIN(V1*8)*40,COLOR00FFFF;  

IF(A2>REF(A2,1),A2,DRAWNULL),COLORFF00FF;  

A3:COS(V1*8)*40,colorgray;  

IF(A3>REF(A3,1),A3,DRAWNULL),colorred;  

PV:=(C*2+H+L)/4;  

SK:=EMA(PV,13)-EMA(PV,34);  

SD:=EMA(SK,9);  

中:0,POINTDOT;  

空:(-2*(SK-SD))*61.8,COLORFFFF00;  

多:(2*(SK-SD))*61.8,COLORAA77AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),2.6,0),COLOR000088;  

STICKLINE(多>REF(多,1),多,REF(多,1),1.8,0),COLOR0000AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),1,0),COLOR0000CC;  

STICKLINE(多>REF(多,1),多,REF(多,1),0.1,0),COLOR0000DD;  

STICKLINE(空>REF(空,1),空,REF(空,1),2.6,0),COLOR008800;  

STICKLINE(空>REF(空,1),空,REF(空,1),1.8,0),COLOR00AA00;  

STICKLINE(空>REF(空,1),空,REF(空,1),1,0),COLOR00CC00;  

STICKLINE(空>REF(空,1),空,REF(空,1),0.1,0),COLOR00DD00;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),2.6,0),COLOR888888;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1.8,0),COLORAAAAAA;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1,0),COLORCCCCCC;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),0.1,0),COLORDDDDDD;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),2.6,0),COLOR006666;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1.8,0),COLOR008888;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1,0),COLOR00AAAA;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),0.1,0),COLOR00CCCC;  

DRAWTEXT(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空-0.5,'逃'),COLOR009900,LINETHICK3;  

DRAWTEXT(REF(多,2)>REF(多,1)AND多>REF(多,1),多-0.5,'抄'),colorred,LINETHICK3;  

N:=14;M:=84;  

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

C1:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));  

C2:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M));  

注意了结:200,COLORRED;  

底部区域:-150,COLORGREEN;  

VARA:=REF(LOW,1);  

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

VARC:=EMA(IF(CLOSE*1.3,VARB*10,VARB/10),3);  

VARD:=LLV(LOW,30);  

VARE:=HHV(VARC,30);  

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

VARG:=EMA(IF(LOW<=VARD,(VARC+VARE*2)/2,0),3)/618*VARF;  

VARH:=IF(VARG>28,28,VARG);  

吸筹:STICKLINE(VARH>-120,0,VARH,6,1),COLOR0FFFFF;  

强弱吸筹:IF(VARH>-120,1,0),COLOR0FFFFF;  

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

买入时机:IF(CROSS(C1,-150),-150,-200),COLORFF00FF,LINETHICK2;  

LL:=REF(CLOSE,1);  

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

分批出:IF(CROSS(80,MM),200,250),COLORCYAN,LINETHICK2;

image.png

二、通达信均线买卖点公式源码

  

P1:=5;  

MA135:=MA(VOL,135);  

TJ1:=VOL=HHV(VOL,10)ANDVOL>1.7*REF(VOL,1)ANDC>=REF(C,1)ANDC>=OANDVOL<=MA135*3.5;  

LJL:=FILTER(TJ1,3);  

TJ3:=IF(BARSLAST(LJL)=1ANDCLOSE>REF(LOW,3),1,0);  

ST:=TJ3=1;  

CL:=FILTER(ST,3);  

STICKLINE(C,REF(L,BARSLAST(CL)),REF(L,BARSLAST(CL)),2,0),COLORYELLOW;  

STICKLINE(CLOSE,REF(L,BARSLAST(LJL)),REF(L,BARSLAST(LJL)),2,0),COLORCYAN;  

STICKLINE(LJL,OPEN,CLOSE,1,0),COLORYELLOW;  

DRAWTEXT(LJL,L*0.99,'支撑'),COLORF00FF0;  

JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));  

DDD:=(DYNAINFO(5)<0.01||DYNAINFO(6)<0.01);  

JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01)&&JJJ>(DYNAINFO(6)-0.01)));  

CYC1:IF(JJJT,0.01*EXPMA(AMOUNT,P1)/EXPMA(VOL,P1),EMA((HIGH+LOW+CLOSE)/3,P1));  

N:=5;M:=35;  

VAR1:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),M,1);  

VAR2:=HIGH-REF(HIGH,1);  

VAR3:=REF(LOW,1)-LOW;  

VAR4:=SMA(IF(VAR2>0ANDVAR2>VAR3,VAR2,0),M,1);  

VAR5:=SMA(IF(VAR3>0ANDVAR3>VAR2,VAR3,0),M,1);  

VAR6:=VAR4*100/VAR1;  

VAR7:=VAR5*100/VAR1;  

VAR8:=SMA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,M,1);  

VAR9:=(VAR8+REF(VAR8,N))/2;  

VARA:=SUM(HIGH-OPEN,M)/SUM(OPEN-LOW,M)*100;  

VARB:=SUM(MAX(0,HIGH-REF(CLOSE,1)),M)/SUM(MAX(0,REF(CLOSE,1)-LOW),M)*100;  

VARD:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;  

VARE:=SUM(AMOUNT,N)/VARC/100;  

VAR10:=SUM(AMOUNT,M)/VARC/100;  

VAR12:=REF(AMOUNT,1)+REF(AMOUNT,2)+REF(AMOUNT,3)+REF(AMOUNT,4);  

VAR13:=VAR12/CAPITAL;  

VAR14:=VOL/CAPITAL*VARD+VAR13*REF(VARC,1);  

LHZ5:IF(DATE,DMA(VARD,VOL/VARE),0);  

LHZ35:IF(DATE,DMA(VARD,VOL/VAR10),0);  

市场绝对成本:IF(DATE,DMA(VARD,VOL/CAPITAL),0),POINTDOT;  

上轨:SMA(AMOUNT/VOL/100,M,1)*1.12,POINTDOT;  

下轨:SMA(AMOUNT/VOL/100,M,1)*0.88,POINTDOT;  

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

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

D:sma(k,3,1),COLORYELLOW,LINETHICK2;  

J:3*K-2*D,COLORMAGENTA,LINETHICK2;  

VAR1:=(((CLOSE-LLV(LOW,32))/(HHV(HIGH,32)-LLV(LOW,32)))*100);  

VAR2:=SMA(VAR1,3,1);  

VAR3:=SMA(VAR2,3,1);  

VAR4:=SMA(VAR3,5,1);  

VAR5:=(CROSS(VAR3,VAR4)AND(VAR3<20));  

Var8:=EMA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13),15);  

Var9:=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);  

Var10:=EMA(Var9,5);  

Var12:=(Var10-REF(Var10,1))/REF(Var10,1)*100;  

Var13:=FILTER(REF(Var10,1)>90ANDVar12<0,10);  

DRAWICON(Var8>0,115,10);  

DRAWICON(Var8<0,115,11);  

DRAWICON(Var8>0,-10,10);  

DRAWICON(Var8<0,-10,11);  

V1:=BARSCOUNT(CLOSE)*3.142/180;  

A2:SIN(V1*8)*40,COLOR00FFFF;  

IF(A2>REF(A2,1),A2,DRAWNULL),COLORFF00FF;  

A3:COS(V1*8)*40,colorgray;  

IF(A3>REF(A3,1),A3,DRAWNULL),colorred;  

PV:=(C*2+H+L)/4;  

SK:=EMA(PV,13)-EMA(PV,34);  

SD:=EMA(SK,9);  

中:0,POINTDOT;  

空:(-2*(SK-SD))*61.8,COLORFFFF00;  

多:(2*(SK-SD))*61.8,COLORAA77AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),2.6,0),COLOR000088;  

STICKLINE(多>REF(多,1),多,REF(多,1),1.8,0),COLOR0000AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),1,0),COLOR0000CC;  

STICKLINE(多>REF(多,1),多,REF(多,1),0.1,0),COLOR0000DD;  

STICKLINE(空>REF(空,1),空,REF(空,1),2.6,0),COLOR008800;  

STICKLINE(空>REF(空,1),空,REF(空,1),1.8,0),COLOR00AA00;  

STICKLINE(空>REF(空,1),空,REF(空,1),1,0),COLOR00CC00;  

STICKLINE(空>REF(空,1),空,REF(空,1),0.1,0),COLOR00DD00;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),2.6,0),COLOR888888;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1.8,0),COLORAAAAAA;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1,0),COLORCCCCCC;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),0.1,0),COLORDDDDDD;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),2.6,0),COLOR006666;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1.8,0),COLOR008888;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1,0),COLOR00AAAA;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),0.1,0),COLOR00CCCC;  

DRAWTEXT(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空-0.5,'逃'),COLOR009900,LINETHICK3;  

DRAWTEXT(REF(多,2)>REF(多,1)AND多>REF(多,1),多-0.5,'抄'),colorred,LINETHICK3;

image.png

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

收盘价上穿1日前的70日内最高价的最高值 AND 上市的天数>100

推荐阅读:通达信买入卖出点主图指标公式

  

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

现量:A1+100,COLORWHITE;  

底:5,DOTLINECOLORGRAY;  

顶:95,COLORLICYAN;  

STICKLINE(CROSS(顶,现量),顶,底,0.8,0),COLORGREEN,;  

DRAWTEXT(CROSS(顶,现量),100,'卖'),COLORYELLOW;  

D11:=IF(CODELIKE('300'),0,1);  

{创业板}  

D2:=IF(NAMELIKE('S'),0,1);  

D3:=IF(NAMELIKE('*'),0,1);  

{去掉停牌>=}  

D4:=DYNAINFO(17)>0;  

市盈率:=DYNAINFO(39)>0ANDDYNAINFO(39)<=62;  

内外盘:=(DYNAINFO(23)>DYNAINFO(22))AND(DYNAINFO(7)>DYNAINFO(3));  

收阳线:=C/REF(C,1)>=1.013&&C/REF(C,1)<=1.080;  

去掉:=D11ANDD2ANDD3ANDD4;  

HAN:=DATE<1141230;  

当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0);  

九十成本集中:=(COST(95)-COST(5))/(COST(95)+COST(5))*100;  

成本价:=COST(九十成本集中);  

DF2:=(C-REF(C,1))/REF(C,1)*100>5;  

DF3:=(C-O)/O*100>4;  

V型反转:=L<成本价ANDDF2;  

V型反转2:=CROSS(C,成本价)ANDDF2;  

V型反转3:=L<成本价ANDDF3;  

XG:V型反转ORV型反转2ORV型反转3  

AND去掉ANDC>=6.00ANDC<19AND内外盘  

ANDCAPITAL/1000000<=3.55;  

VAR1:((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;  

0,VOLSTICK;  

拉升%:IF(VAR1>0,VAR1,0),colorred;  

短顶:STICKLINE(VAR1>9ANDFILTER(VAR1<REF(VAR1,1),5),VAR1+2,0,3,0),colorred;  

大顶:STICKLINE(VAR1>20ANDFILTER(VAR1<REF(VAR1,1),5),VAR1+5,0,7,0),colorcyan;  

VAR2:=HHV(VAR1>20,10);  

危险:STICKLINE(VAR2ANDCROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR1+10,0,4,0);  

注意止损:STICKLINE(VAR2ANDFILTER(VAR1<REF(VAR1,1),6)ANDCROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR1+6,0,3,0);  

短底:STICKLINE(VAR1<-9ANDVAR1>REF(VAR1,1),VAR1-2,0,3,0),colorgreen;  

大底:STICKLINE(VAR1<-20ANDFILTER(VAR1>REF(VAR1,1),5),VAR1-5,0,7,0),coloryellow;  

买入准备:VAR1<-9ANDVAR1>REF(VAR1,1);  

V1:=BARSCOUNT(CLOSE)*3.142/180;  

A2:SIN(V1*8)*40,COLOR00FFFF;  

IF(A2>REF(A2,1),A2,DRAWNULL),COLORFF00FF;  

A3:COS(V1*8)*40,COLORGRAY;  

IF(A3>REF(A3,1),A3,DRAWNULL),COLORRED;  

PV:=(C*2+H+L)/4;  

SK:=EMA(PV,13)-EMA(PV,34);  

SD:=EMA(SK,9);  

中:0,POINTDOT;  

空:(-2*(SK-SD))*61.8,COLORFFFF00;  

多:(2*(SK-SD))*61.8,COLORAA77AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),2.6,0),COLOR000088;  

STICKLINE(多>REF(多,1),多,REF(多,1),1.8,0),COLOR0000AA;  

STICKLINE(多>REF(多,1),多,REF(多,1),1,0),COLOR0000CC;  

STICKLINE(多>REF(多,1),多,REF(多,1),0.1,0),COLOR0000DD;  

STICKLINE(空>REF(空,1),空,REF(空,1),2.6,0),COLOR008800;  

STICKLINE(空>REF(空,1),空,REF(空,1),1.8,0),COLOR00AA00;  

STICKLINE(空>REF(空,1),空,REF(空,1),1,0),COLOR00CC00;  

STICKLINE(空>REF(空,1),空,REF(空,1),0.1,0),COLOR00DD00;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),2.6,0),COLOR888888;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1.8,0),COLORAAAAAA;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),1,0),COLORCCCCCC;  

STICKLINE(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空,REF(空,1),0.1,0),COLORDDDDDD;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),2.6,0),COLOR006666;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1.8,0),COLOR008888;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),1,0),COLOR00AAAA;  

STICKLINE(REF(多,2)>REF(多,1)AND多>REF(多,1),多,REF(多,1),0.1,0),COLOR00CCCC;  

DRAWTEXT(REF(空,2)>REF(空,1)AND空>REF(空,1)AND空<=0,空-0.5,'逃'),COLOR009900,LINETHICK3;  

DRAWTEXT(REF(多,2)>REF(多,1)AND多>REF(多,1),多-0.5,'抄'),COLORRED,LINETHICK3;  

N:=20;B1:=12;B2:=50;  

MID:=MA(C,N);  

VART1:=POW((C-MID),2);  

VART2:=MA(VART1,N);  

VART3:=SQRT(VART2);  

UPPER:=MID+2*VART3;  

LOWER:=MID-2*VART3;  

BOLL:=REF(MID,1),COLORFFFFFF;  

上轨:REF(UPPER,1),COLOR00FFFF;  

下轨:REF(LOWER,1),COLORFF00FF;  

快线:EXPMA(CLOSE,B1),COLORWHITE;  

慢线:EXPMA(CLOSE,B2);  

阳涨幅:=3.5;  

阳倍量:=1.9;  

单阳收:=C;  

单阳开:=O;  

单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)ANDVOL>REF(VOL,1)*阳倍量;  

DRAWTEXT(CURRBARSCOUNT<100AND单阳,L*0.98,'阳'),COLOR00FFFF;  

高不破价:=REF(C,BARSLAST(单阳));  

低不破价:=REF(L,BARSLAST(单阳));  

单阳不破:=CURRBARSCOUNT<100ANDBARSLAST(单阳)<11AND(LLV(L,BARSLAST(单阳))>低不破价ORLLV(L,BARSLAST(单阳))=低不破价);  

STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN;  

STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;  

STICKLINE(单阳,单阳开,单阳收,2,0),COLORYELLOW;  

DRAWTEXT(BARSLAST(单阳)=1AND单阳不破,低不破价*0.98,'1'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=2AND单阳不破,低不破价*0.98,'2'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=3AND单阳不破,低不破价*0.98,'3'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=4AND单阳不破,低不破价*0.98,'4'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=5AND单阳不破,低不破价*0.98,'5'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=6AND单阳不破,低不破价*0.98,'6'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=7AND单阳不破,低不破价*0.98,'7'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=8AND单阳不破,低不破价*0.98,'8'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=9AND单阳不破,低不破价*0.98,'9'),COLORGREEN;  

DRAWTEXT(BARSLAST(单阳)=10AND单阳不破,低不破价*0.98,'10'),COLORGREEN;

image.png

每日公式解答:

  

公式编写要求:  

涨停板在3板以下并且首板站在30线上的选股公式。  

公式编写方法:  

ZT:=IF(NAMELIKE('ST')ORNAMELIKE('*ST'),C=ZTPRICE(REF(C,1),0.05),  

IF(CODELIKE('688')OR(CODELIKE('300')ANDDATE>=1200824),C=ZTPRICE(REF(C,1),0.2),  

C=ZTPRICE(REF(C,1),0.1)));  

AA:=BARSSINCE(ZT);  

REF(CROSS(C,MA(C,120)),AA)ANDCOUNT(ZT,AA)<=2ANDCOUNT(ZT,AA)>0;

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