通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信抓涨停主图指标公式

  

GJ:=(C+H+L+O)/4;  

明日阻力:=L+(GJ-L)+(C-L);  

明日支撑:=L+(C-GJ);  

下档线:=(((CLOSE-  

LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13)))*  

100);  

RRRSV:=SMA(下档线,3,1);  

KKK:=SMA(RRRSV,3,1);  

DDDDD:=((3*RRRSV)-  

(2*KKK));  

JJ12:=(((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)))*  

100);  

RSV24:=SMA(JJ12,3,1);  

K24:=SMA(RSV24,3,1);  

D24:=((3*RSV24)-(2  

*  

K24));  

压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;  

底部:=LLV(HIGH,30),COLOR00FF00;  

今日阻力:REF(明日阻力  

,1),NODRAW;  

今日支撑:REF(明日支撑,  

1),NODRAW;  

压力位:IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;  

底部位:IF(ISLASTBAR,底部,DRAWNULL),NODRAW;  

高:=REF(HHV(H,80),3);  

低:=REF(LLV(L,80),3);  

H19:=高-(高-低)*0.191;  

H38:=高-(高-低)*0.382;  

A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));  

B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);  

分水岭:IF(MA(CLOSE,17)<B,B,MA(CLOSE,17)),COLORFF00FF,LINETHICK1;  

PMA:=分水岭;  

DD:=分水岭<REF(分水岭,1);  

IF(DD,分水岭,DRAWNULL),COLOR00FF00,LINETHICK1;  

操作线:分水岭-(EMA(C,3)-分水岭),COLOR00FFFF,LINETHICK1;  

S:=(PMA>操作线);  

IF(S,分水岭,DRAWNULL),COLOR00FF00,POINTDOT,LINETHICK1;  

PM:MA(C,5),COLORFFFFCC,LINETHICK1;  

IF(PM>REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK1;  

IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;  

IF(PM<REF(PM,1),PM,DRAWNULL),COLORFF9900,LINETHICK1;  

DRAWTEXT(CROSS(分水岭,操作线),分水岭-0.1,'三底背离');  

A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));  

B1:=REF(C,A1+1)>CANDREF("MACD.DIF",A1+1)<"MACD.DIF"ANDCROSS("MACD.DIF","MACD.DEA");  

DRAWTEXT(B1>0,L-0.02,'M底背离'),COLOR00FFFF;  

A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));  

B2:=REF(C,A2+1)>CANDREF("KDJ.K",A2+1)<"KDJ.K"ANDCROSS("KDJ.K","KDJ.D");  

DRAWTEXT(B2,L-0.10,'K底背离'),COLORFF00FF;  

A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));  

B3:=REF(C,A3+1)>CANDREF("RSI.RSI1",A3+1)<"RSI.RSI1"ANDCROSS("RSI.RSI1","RSI.RSI2");  

DRAWTEXT(B3>0,L-0.18,'R底背离'),COLOR0000FF;  

C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));  

D1:=REF(C,C1+1)<CANDREF("MACD.DIF",C1+1)>"MACD.DIF"ANDCROSS("MACD.DEA","MACD.DIF");  

DRAWTEXT(D1>0,H+0.16,'M顶背离'),COLOR00FF00;  

C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));  

D2:=REF(C,C2+1)<CANDREF("KDJ.K",C2+1)>"KDJ.K"ANDCROSS("KDJ.D","KDJ.K");  

DRAWTEXT(D2>0,H+0.08,'K顶背离'),COLORFFFFCC;  

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));  

D3:=REF(C,C3+1)<CANDREF("RSI.RSI1",C3+1)>"RSI.RSI1"ANDCROSS("RSI.RSI2","RSI.RSI1");  

DRAWTEXT(D3>0,H+0.04,'R顶背离'),COLORFF9900;  

C1:=CLOSE>REF(CLOSE,1);  

STICKLINE(C1,OPEN,CLOSE,2,0),COLORRED;  

C2:=REF(C,1);  

涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);  

STICKLINE(涨停,H,L,0,0),COLORYELLOW;  

STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;  

跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);  

STICKLINE(跌停,OPEN,CLOSE,2,0),COLORBLUE;  

STICKLINE(跌停,H,L,0,1),COLORBLUE;  

大阴线:=IF((C2-C)*100/C2>=5,1,0)ANDIF((C2-C)*100/C2<(10-0.01*100/C2),1,0)ORIF((O-C)*100/O>=5,1,0) ANDIF((C2-C)*100/C2<(10-0.01*100/C2),1,0);  

STICKLINE(大阴线,OPEN,CLOSE,2,0),COLORBLUE;  

STICKLINE(大阴线,H,L,0,1),COLORBLUE;  

TY:=C;  

AA1:=REF(TY,10)=HHV(TY,2*10+1);BB1:=FILTER(AA1,10);CC1:=BACKSET(BB1,10+1);HD:=FILTER(C1,10);  

AA2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(AA2,10);CC2:=BACKSET(B2,10+1);LD:=FILTER(CC2,10);  

JJ:=(3*C+H+L+O)/6;  

VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;  

TJ1:=VOL=HHV(VOL,10)ANDVOL>2*REF(VOL,1)ANDCLOSE>VAR1ANDC>REF(C,1);  

LJL:=FILTER(TJ1,5)ANDC>OAND(C-O)/REF(C,1)>0.06;  

TJ2:=IF(BARSLAST(LJL)=1ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(LJL)=2ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(LJL)=3ANDCLOSE>REF(HIGH,3),1,0)));  

TP:=TJ2=1;  

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

STFZ:=TJ3=1;  

CL:=STFZANDTP;  

TJCL:=FILTER(CL,3);  

K4:=EMA(L,30),COLORBLUE;  

K5:=EMA(L,40),COLORBLUE;  

DRAWBAND(K5,RGB(0,255,0),K4,RGB(255,255,0));  

XG:=SUM(C/REF(C,1)-1>0.07,12)>1ANDL<MA(L,13);  

DD:=SUM(C/REF(C,1)-1>0.07,30)>1ANDL<MA(L,18);  

AA:=EMA(C,5)>EMA(C,18)ANDEMA(C,13)>EMA(C,20)ANDEMA(C,20)>EMA(C,40)ANDL<REF(L,1)ANDL<REF(L,2);  

A:=XGORDD;  

抄底线:MIN(K4,K5)*0.955,COLORMAGENTA;  

image.png

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

输出XG:上次"KDJ的J">100距今天数<6 AND "KDJ的J"<0

每日通达信公式解答:


  

编写条件:  

成交量比前一日增加50%以上的选股公式。  

编写方法:  

XG:V>=REF(V,1)*1.


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