通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
RR8:=MA(CLOSE,27);
RR9:=(CLOSE-RR8)/RR8*100;
RRA:=MA(RR9,2);
RRB:=BARSLAST(CROSS(-10,RRA)=1);
RRD:=RRA -10 AND RRB
STICKLINE(IF(RRD,-120,0),-120,0,8,0),COLORLIBLUE;
【】:IF(RRD,-120,0),COLORYELLOW,LINETHICK2;
TYP := (HIGH + LOW + CLOSE)/3;
CCI14:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORMAGENTA,LINETHICK2;
N:=21;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),colorwhite;
D:SMA(K,M2,1),coloryellow;
J:3*K-2*D,colorff00ff ;
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(GJTJ4,GJTJ1)) 3 AND BARSLAST(CROSS(GJTJ1,GJTJ4))
B:=BARSLAST(CROSS(GJTJ4,GJTJ2));
D:=GJTJ3;
E:=BARSLAST(CROSS(GJTJ4,GJTJ3)) 3 AND BARSLAST(CROSS(GJTJ1,GJTJ4))
F:=GJTJ2;
B1:=A 0 AND REF(A,1)=0 AND REF(A,2)
周K:= KDJ.K#WEEK
周D:= KDJ.D#WEEK
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D1:=SMA(K,3,1);
去停牌:=DYNAINFO(8)
去ST:=NOT(NAMELIKE( ST ) OR NAMELIKE( *ST ) OR NAMELIKE( S
ENTERLONG:A AND B AND D AND E AND F AND 去停牌 AND 去ST AND CROSS(周K,周D);
DRAWGBK(OPEN 0,RGB(185,135,0),RGB(85,55,0),0, 02 ,0);
NOTEXT顶:95,DOTLINE,COLORLIGRAY;
NOTEXT底:0,DOTLINE,COLORLIGRAY;
NOTEXT分界线:50,DOTLINE,COLORLIGRAY;
A1:=(CLOSE+HIGH+LOW+OPEN)/4;
MA1:=EMA(A1,5);
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV1,3,1);
D1:=SMA(K1,3,1);
J1:=3*K1-2*D1;
RSV2:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
K2:=SMA(RSV2,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
RSV3:=(CLOSE-LLV(LOW,31))/(HHV(HIGH,31)-LLV(LOW,31))*100;
K3:=SMA(RSV3,3,1);
D3:=SMA(K3,3,1);
J3:=3*K3-2*D3;
RSV4:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K4:=SMA(RSV4,3,1);
D4:=SMA(K4,3,1);
J4:=3*K4-2*D4;
K:EMA((K1+K2+K3+K4)/4,3),COLORWHITE,NODRAW;
D:EMA((D1+D2+D3+D4)/4,3),COLORYELLOW,NODRAW;
J:EMA(J1,3)COLORMAGENTA,NODRAW;
过滤:= K REF(K,1) AND K3 =REF(K3,1);
STICKLINE(过滤,0,K,3,0),COLOR993333;
STICKLINE(过滤,0,K,2.7.5,0),COLOR995533;
STICKLINE(过滤,0,K,2.4,0),COLOR996633;
STICKLINE(过滤,0,K,2.1,0),COLOR998833;
STICKLINE(过滤,0,K,1.8,0),COLOR999966;
STICKLINE(过滤,0,K,1.5,0),COLOR999933;
STICKLINE(过滤,0,K,1.2,0),COLOR999966;
STICKLINE(过滤,0,K,0.9,0),COLOR999988;
STICKLINE(过滤,0,K,0.6,0),COLORLIGRAY;
STICKLINE(过滤,0,K,0.3,0),COLORCCCCCC;
RSV6:=(INDEXC-LLV(INDEXL,7))/(HHV(INDEXH,7)-LLV(INDEXL,7))*100;
KI:=SMA(RSV6,3,1);
DI:=SMA(KI,3,1);
JI:=3*KI-2*DI;
WIN:=WINNER(CLOSE*0.9)*100;
VAR1:=EMA(EMA(CLOSE,9),9);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
开始控盘:=过滤 AND (控盘 0 OR WIN 1) AND K REF(K,1) AND K3 REF(K3,1);
STICKLINE(开始控盘,0,K,3,0),COLOR0000FF;
STICKLINE(开始控盘,0,K,2.7,0),COLOR001BFF;
STICKLINE(开始控盘,0,K,2.4,0),COLOR0025FF;
STICKLINE(开始控盘,0,K,2.1,0),COLOR0039FF;
STICKLINE(开始控盘,0,K,1.8,0),COLOR0052FF;
STICKLINE(开始控盘,0,K,1.5,0),COLOR006AFF;
STICKLINE(开始控盘,0,K,1.2,0),COLOR0089FF;
STICKLINE(开始控盘,0,K,0.9,0),COLOR009CFF;
STICKLINE(开始控盘,0,K,0.6,0),COLOR00C0FF;
STICKLINE(开始控盘,0,K,0.3,0),COLOR00CAFF;
:=MA1 =REF(MA1,1) AND K2 REF(K2,1) AND K3 REF(K3,1) AND K4 REF(K4,1) AND K REF(K,1) AND WIN
STICKLINE(开始控盘 AND 趋势,0,K,0.6,0),COLOR99A9FF;
STICKLINE(开始控盘 AND 趋势,0,K,0.3,0),COLOR9999FF;
指数趋势:EMA(JI,3),COLORFF9966,LINETHICK1,NODRAW;
:WIN,COLOR009CFF,NODRAW;
NOTEXTK:K,COLORWHITE,LINETHICK1;
NOTEXTD:D,COLORYELLOW,LINETHICK1;
NOTEXTJ:J,COLORMAGENTA,LINETHICK1;
X1:=BARSLAST(REF(CROSS(K,D),1));
底:=REF(CLOSE,X1+1) CLOSE AND K REF(K,A1+1) AND CROSS(K,D);
DRAWICON(底背离,67,1);
DRAWTEXT(底背离,60, 底背离 ),COLORRED;
X2:=BARSLAST(REF(CROSS(D,K),1));
顶背离:=REF(CLOSE,X2+1) CLOSE AND REF(K,X2+1) K AND CROSS(D,K);
DRAWICON(顶背离,92,2);
DRAWTEXT(顶背离,85, 顶背离 ),COLORGREEN;
底部:=CROSS(K3,D3) AND K3
STICKLINE(底部,0,10,2,0),COLOR0000FF;
DRAWTEXT(底部,25, 底部 ),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(K3,D3),BARSLAST(K3 25));
再次探底:=CROSS(K3,D3) AND K3 25 AND COUNT(JCCOUNT=2,15)=1;
DRAWTEXT(再次探底,45, 再次探底 ),COLORYELLOW;
公式解读:
[源码注释]通达信公式动态公式解读GG赋值:收盘价/1日前的收盘价-1
DPC赋值: 999999$收盘价
DP赋值:DPC/1日前的DPC-1
强弱赋值:GG-DP
当满足条件强弱 0时,在0和1位置之间画柱状线,宽度为3,0不为0则画空心柱.,画红色
当满足条件强弱 0时,在0和1位置之间画柱状线,宽度为3,0不为0则画空心柱.,画淡蓝色
N:=3;
N1:=3;
N2:=30;
N3:=120;
N4:=3;
N5:=3;
N6:=3;
柱量:VOL,VOLSTICK,NODRAW;
量辅助线:(柱量)*1,COLOR99EEEE,LINETHICK1,NODRAW;
MACT:EMA(量辅助线,N1),COLOR99EEEE,LINETHICK1,NODRAW;
MACP:EMA(量辅助线,N2),COLOR99EEEE,LINETHICK2,NODRAW;
MACK:EMA(量辅助线,N3),COLOR99EEEE,LINETHICK2,NODRAW;
MACJ:EMA(MACT,N4),COLOR9900EE,LINETHICK2;
MACG:EMA(MACP,N5),COLORGREEN,LINETHICK2;
MACF:EMA(MACK,N6),COLORBLUE,LINETHICK2;
MACI:EMA(MACJ,N),COLOR66FFEE,LINETHICK1;
VA:=IF(CLOSE REF(CLOSE,1),VOL,-VOL);
OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
A:=C 20ANDCAPITAL/100 60000;
B:=OBV=HHV(OBV,40)ANDC HHV(C,40)ANDA;{已修改};
D:=UPNDAY(MA(C,20),8)ANDC MA(C,20)ANDCCI.CCI REF(CCI.CCI,1)ANDCCI.CCI
新高:BANDD;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26)),COLORWHITE;
DEA:=(EMA(DIF,9)),COLORYELLOW;
MACD:(DIF-DEA)*2,COLORSTICK,COLORGREEN;
MACDX:=MACD;
TJG:=NOT(NAMELIKE( S )ORNAMELIKE( *S ))ANDDYNAINFO(8)
VA1:=HHVBARS(MACDX,BARSLAST(MACDX 0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACDX),REF(VA1,1)+2),0.5);
TTX:=BARSLAST(VA2);
前高:DRAWLINE(VA2,MACDX,REF(VA2,1),REF(MACDX,1),1),DOTLINE;
黄柱:TTXANDMACDX REF(MACDX,TTX),NODRAW,COLORYELLOW;
{STICKLINE(黄柱,MACDX,前高,1,0),COLORYELLOW;
连续飘黄:BARSLASTCOUNT(黄柱),NODRAW,COLORYELLOW;
十日飘黄:COUNT(黄柱,10),NODRAW,COLORYELLOW;
}
VA3:=LLVBARS(MACDX,BARSLAST(MACDX 0)+1);
VA4:=CROSS(BACKSET(CROSS(MACDX,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MACDX),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MACDX,REF(VA4,1),REF(MACDX,1),1),COLORGREEN,DOTLINE;
GT:=BARSLAST(VA2);
DT:=BARSLAST(VA4);
条件A:=VA2ANDMACDX REF(MACDX,REF(GT,1)+1);
条件B:=VA4ANDMACDX REF(MACDX,REF(DT,1)+1);
选股:=条件BANDCOUNT(条件A,REF(DT,1))=1;
条件A1:=VA2ANDMACDX REF(MACDX,REF(GT,1)+1);
条件B1:=VA4ANDMACDX REF(MACDX,REF(DT,1)+1);
选股1:=条件B1ANDCOUNT(条件A1,REF(DT,1))=1;
条件A2:=VA2ANDMACDX REF(MACDX,REF(GT,1)+1);
条件B2:=VA4ANDMACDX REF(MACDX,REF(DT,1)+1);
选股2:=条件B2ANDCOUNT(条件A2,REF(DT,1))=1;
条件A3:=VA2ANDMACDX REF(MACDX,REF(GT,1)+1);
条件B3:=VA4ANDMACDX REF(MACDX,REF(DT,1)+1);
选股3:=条件B3ANDCOUNT(条件A3,REF(DT,1))=1;
收敛三角:(CROSS(MACDX 前高ANDCOUNT(选股,GT)=1,0.5)ANDTJG)*MACDX,COLORWHITE;
上升旗形:(CROSS(MACDX 前高ANDCOUNT(选股1,GT)=1,0.5)ANDTJG)*MACDX,COLORGREEN;
扩张三角:(CROSS(MACDX 前高ANDCOUNT(选股2,GT)=1,0.5)ANDTJG)*MACDX,COLORYELLOW;
下降旗形:(CROSS(MACDX 前高ANDCOUNT(选股3,GT)=1,0.5)ANDTJG)*MACDX,COLORCYAN;
MACDXT:收敛三角=MACDXOR上升旗形=MACDXOR扩张三角=MACDXOR下降旗形=MACDX,NODRAW,COLORGRAY;
ZERO:0;DIFF:EMA(CLOSE,6)-EMA(CLOSE,13);DEA:EMA(DIFF,4);MACD:2*(DIFF-DEA);线:EMA(DIFF-MA(REF(DIFF,1),1),1)*1.862,COLORWHITE,LINETHICK1;STICKLINE(MACD 0ANDMACD =REF(MACD,1),0,MACD,5,0),COLOR0000FF;STICKLINE(MACD 0ANDMACD REF(MACD,1),0,MACD,5,0),COLORFFFF00;STICKLINE(MACD 0ANDMACD =REF(MACD,1),0,MACD,5,0),COLORFF00FF;STICKLINE(MACD 0ANDMACD REF(MACD,1),0,MACD,5,0),COLOR00FF00;DIF:=EMA(CLOSE,6)-EMA(CLOSE,13);MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);YXF:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0);蓝:IF(FILTER(YXF=1,5),20,0),COLORLIBLUE,LINETHICK3;红:IF(FILTER(YXF=1,5),10,0),COLORRED,LINETHICK2;黄:IF(FILTER(YXF=1,5),5,0),COLORYELLOW,LINETHICK1;A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;S2:=SMA(C,3,1);S6:=SMA(C,5,1);DK:=2*(S2-S6);主力成本:EMA(X,13),COLORFF00FF,LINETHICK0;
公式编写要求:
股价当日上涨或下跌都小于3%的公式。
公式编写方法:
DYNAINFO(13) 0.03;