加载中…
个人资料
花远
花远
  • 博客等级:
  • 博客积分:0
  • 博客访问:25,819
  • 关注人气:6
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
谁看过这篇博文
加载中…
正文 字体大小:

通达信指标

(2013-04-02 09:44:28)

MACD和KDJ金叉共振(通达信)
{SHORT:=2 200 12;  LONG:=2 200 26;   MID:=2 200 9;  N:=2 90 9;  M1:=2 30 3;   M2:=2 30 3;}

DIF:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))*100,COLORRED;
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;

IF(DIF


DD:=C=HHV(C,180);
EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;
{CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*DEA,COLOR00FFFF;}
顶背离:(DD AND EE AND DEA< HHV(DEA,180))*DEA,STICK,LINETHICK3,COLORGREEN;

FF:=C=LLV(C,180);
GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;
{LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*DEA,COLORMAGENTA;}
底背离:(FF AND GG AND DEA> LLV(DEA,180))*DEA,STICK,LINETHICK3,COLORRED;
 


RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),COLORYELLOW,LINETHICK1;
D:SMA(K,M2,1),COLORWHITE,LINETHICK1;
J:3*K-2*D,COLORMAGENTA,LINETHICK1;
IF(J

 

A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIF,A1+1)
A22:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A22+1)>C AND REF("KDJ.K"(9,3,3),A22+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));


B4:=CROSS(DIF,DEA) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
DRAWTEXT(B4,DEA-0.20,'★金叉共振'),COLOR0099FF;

C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,D+0.6,'KDJ顶背'),COLORLIGRAY;{KDJ顶背离}

DRAWTEXT(B2,J-0.6,'KDJ底背'),COLORRED;
 
 
MACD和ROC(通达信)
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA  : EMA(DIFF,9);
MACD : 2*(DIFF-DEA)*80, COLORSTICK;
ROC1:=(CLOSE-REF(CLOSE,14))/REF(CLOSE,14)*100;
ROC2:=(CLOSE-REF(CLOSE,11))/REF(CLOSE,11)*100;
提前量:MA(ROC2,6),COLORYELLOW,LINETHICK2;
HZ1:=EMA(ROC1,13),LINETHICK1,COLORYELLOW;
HZ2:EMA(ROC1,4),COLORGREEN,LINETHICK1;
HZ3:EMA(HZ2,2),COLORGREEN,LINETHICK1;
HZ4:EMA(HZ3,2),COLORGREEN,LINETHICK1;
HZ5:EMA(HZ4,2),COLORMAGENTA,LINETHICK1;
HZ6:EMA(HZ5,2),COLORMAGENTA,LINETHICK1;
HZ7:EMA(HZ6,2),COLORMAGENTA,LINETHICK1;
起步线:-13,POINTDOT,COLORGREEN;
强势线:0,POINTDOT,LINETHICK1,COLORMAGENTA;
 
 
RSI和KDJ(通达信)
{SN 1 300 9;lM 1 100 3;MP 1 100 3}

LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),SN,1)/SMA(ABS(CLOSE-LC),SN,1)*100;
K:SMA(RSI,LM,1);
D:SMA(K,MP,1);
J:3*K-2*D;
 
 
RSI底背离(通达信)
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
DRAWTEXT(FILTER(B3>0,5),L-0.4,'R 底背'),COLORFFFF00;

 

 

CCI顶底背离(通达信)
 
{参数n 1  100 14}


TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
RSI1:=CCI;
AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);
A1:=BARSLAST(REF(CC,1));
顶背离:=REF(CLOSE,A1+1)RSI1 AND CC;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORGREEN,LINETHICK2;
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A2:=BARSLAST(REF(CC2,1));
底背离:=REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA,LINETHICK2;
 
 
CCI买卖点(通达信)
N:=14;
M:=210;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
TYP15:=(HHV(HIGH,15)+LLV(LOW,15)+CLOSE)/3;
CCI15:(TYP15-MA(TYP15,M))/(0.015*AVEDEV(TYP15,M)),COLORRED;
AA:=REF(CCI,3)=HHV(CCI,2*3+1);
BB:=BACKSET(AA,3+1);
CC:=FILTER(BB,3) AND CCI=HHV(CCI,3+1);
A1:=BARSLAST(REF(CC,1));
顶背离:=REF(CLOSE,A1+1)CCI AND CC;
DRAWLINE(CC,CCI,FILTER(顶背离>0,5),CCI,0),COLORRED,LINETHICK3;
AA2:=REF(CCI,3)=LLV(CCI,2*3+1);
BB2:=BACKSET(AA2,3+1);
CC2:=FILTER(BB2,3) AND CCI=LLV(CCI,3+1);
AA2A:=BARSLAST(REF(CC2,1));
底背离:=REF(C,AA2A+1)>CLOSE AND REF(CCI,AA2A+1)
DRAWLINE(CC2,CCI,FILTER(底背离>0,5),CCI,0),COLORRED,LINETHICK4;
DRAWLINE(CC2,CCI,FILTER(底背离>0,5),CCI,0),COLORRED,LINETHICK4;


-100;0;100;

 

用法提示:

1)选好股票;

2)用1分钟K线图;

3)按照CCI指标的用法,15分钟线看走势、看范围(-100至+100为正常区,>100为强势区,  

  <-100为弱势区),根据走势和范围决定买或卖;

4)1分钟线配合15分钟线定买卖点.


买点1:15'和1'都在-100的弱势区,是较理想的低买点,效益最大.

买点2:15'在-100至+100的正常区,1'在<-100的弱势区,效益较好.

买点3:15'在>100的强势区,1'在正常区,有一定效益.

点,看1'线和15'线的位置,不看上穿-100或+100线时,因为此处不是买点!


卖点的掌握:

1) 15'线和1'线都在CCI>100的强势区;

2) 卖点应以15'线的顶拐点为准,1'线的顶拐点有时与15'线的顶拐点谐振而同时出现,大多是先于15'线出现,

但此处不是卖点,须等15'线拐点出现才是卖点;
 
 
 
DMI(通达信)
TR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);

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

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

DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);

DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);

PDI:DMP*100/TR,COLORRED;

MDI:DMM*100/TR,COLORGREEN;

ADX:SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1),COLORYELLOW;

16;

30;

 


    其中参数N取默认值14, N 2 100 14。

 

    上述指标将产生两条水平线:16和30;及三条指标线:红色的PDI,绿色的MDI和**的ADX。

 

    请大家装上后好好把玩一番,我接下来要叙述的用法和你在国内有关技术分析书中介绍的DMI的用法是完全不同的。

 

(1)强的上升趋势(牛市): PDI > MDI AND ADX >= 30 。

 

(2)强的下降趋势(熊市):PDI < MDI AND ADX >= 30 。

 


(3)略牛的盘整期:PDI > MDI AND 16 < ADX < 30。

 

(4)略熊的盘整期:PDI < MDI AND 16 < ADX < 30。

 

(5)静寂期: ADX < =16 AND (PDI > MDI OR PDI < MDI) 。

 

(6)在牛市ADX越大越强,但是大于60就要注意了,牛市将可能要回调。

 


    上面的PDI你可理解成牛的力量;MDI理解成熊的力量;而ADX理解成牛熊力量对比的度量没有方向性。
 
 
KDJ(用于30分钟)(通达信)
RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,3,1);
趋势J1:3*K-2*D,COLORRED;
趋势J2:EMA(K,3),LINETHICK1;
IF(趋势J1>=REF(趋势J1,1),趋势J1,DRAWNULL),COLORRED,LINETHICK2;
IF(趋势J1< REF(趋势J1,1),趋势J1,DRAWNULL),COLORBLUE,LINETHICK2;
BBIAS := (CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
抢反弹:= IF(CROSS(K,D) AND BBIAS<-6 AND D<16 AND CLOSE>REF(CLOSE,1),80,0),COLOR00FF00;
DRAWICON(抢反弹=80,趋势J2-0.005,1);
底部动态:EMA(IF(L<= LLV(L,40),SMA(ABS(L-REF(L,1)),40,1)/SMA(MAX(L-REF(L,1),0),40,1),0),3)*10,STICK,COLORRED,LINETHICK2;
DRAWLINE(D>=HHV(D,21),D,D<=LLV(D,21),D,1),COLOR00FF00;
V1:=AMOUNT/VOL/100;
V2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
V3:=SUM(AMOUNT,7)/V1/100;
V4:=DMA(V2,VOL/V3);
V5:=(CLOSE-V4)/V4*100;
V6:=MA(V5,20)+STD(V5,20);
BIAS21:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;
STICKLINE(REF(BIAS21,1)>=5 AND CROSS(V6,V5) AND REF("KDJ.J"(34,3,3),1)>80 AND REF("KDJ.J"(9,3,3),1)>80,90,85,5,0),COLOR00FF00;
 
 
KDJ周月金叉(含顶底背离)要结合别的指标用,信号漂移(通达信)
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RQ:=IF(DATE+19000000<20090630,1,0);
K:SMA(RSV,3,1)*RQ,LINETHICK2,COLORWHITE;
D:SMA(K,3,1),LINETHICK2,COLOR00DDDD;
J:3*K-2*D,LINETHICK2,COLORBB00CC;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
CDA:=MACD0;
CDB:=MACD>=REF(MACD,1) AND MACD>0;
CDC:=MACD>REF(MACD,1) AND MACD<0;
CDD:=MACD<=REF(MACD,1) AND MACD<0;
STICKLINE(MACD>=0,79,80,5,1),COLORBB00AA;
STICKLINE(MACD<0,79,80,5,1),COLORGREEN;
STICKLINE(CDB OR CDC,19,20,5,1),COLORBB00AA;
STICKLINE(CDD OR CDA,19,20,5,1),COLORGREEN;
周K:="KDJ.K#WEEK"(9,3,3);
周D:="KDJ.D#WEEK"(9,3,3);
周J:="KDJ.J#WEEK"(9,3,3);
月K:="KDJ.K#MONTH"(9,3,3);
月D:="KDJ.D#MONTH"(9,3,3);
月J:="KDJ.J#MONTH"(9,3,3);
月金叉:=CROSS(月K,月D);
周金叉:=CROSS(周K,周D);
日金叉:=FILTER(CROSS(K,D) AND D<20,4);
DRAWTEXT(月金叉,K*1.028,' KD月金叉'),COLORYELLOW;
DRAWTEXT(周金叉 OR 月金叉,周D*0.96,'★'),COLOR0022EE;
DRAWTEXT(周金叉,周D*0.96,' KD周金叉'),COLORGREEN;
DRAWTEXT(日金叉,K,'KD金叉'),COLORFF00FF;
DRAWTEXT(CROSS("KDJ.D#WEEK"(9,3,3),"KDJ.K#WEEK"(9,3,3)) ,K+6,'KD周死叉'),COLORFFF000;
DRAWTEXT(CROSS("KDJ.D#MONTH"(9,3,3),"KDJ.K#MONTH"(9,3,3)),D-6,'KD月死叉'),COLORFFFFFF;
KDB:=BARSLAST(REF(CROSS(K,D),1));
KDDB:=REF(CLOSE,KDB+1)>CLOSE AND REF(K,KDB+1)
K底背:=IF(FILTER(KDDB>0,5),1,0);
DRAWTEXT(K底背=1,D*0.45,'KD底背离'),COLOR0099FF;
KDD:=BARSLAST(REF(CROSS(D,K),1));
K顶背:=REF(CLOSE,KDD+1)K AND CROSS(D,K);
DRAWTEXT(FILTER(K顶背>0,5),D*1.026,'KD顶背离'),COLOR33FFBB;
 
 
MACD大道至简(通达信)
CLOSE>MA(C,26),COLORGRAY,LINETHICK2;
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
 

0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有