找回密码
 立即注册

QQ登录

只需一步,快速开始

广告载入中...
查看: 579|回复: 0

MACD+KDJ超准(通达信)

[复制链接]
发表于 2016-5-20 13:27 | 显示全部楼层 |阅读模式

马上注册,享用更多功能,让你轻松玩转本论坛。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
 DIFEMA(CLOSE,8)-EMA(CLOSE,20))*100;
DEA:EMA(DIF,6);
DIF-DEA)*2,COLORSTICK;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
IF(DIFDEA,DIF,DRAWNULL),COLORGREEN;
DD:=C=HHV(C,180);
EE:=DEAREF(DEA,1)ANDREF(DEAREF(DEA,1),1)=1;
CC:=CREF(C,1)ANDREF(CREF(C,1),1)=1;
顶背离:=(DDANDEEANDDEAHHV(DEA,180))*DEA;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
{顶背:=REF(CLOSE,A2+1)CLOSEANDREF(DIF,A2+1)DIFANDCROSS(DEA,DIF);}
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORRED,LINETHICK2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
  K:SMA(RSV,3,1),COLORFFFFFF;
D:SMA(K,3,1),COLOR00FFFF;
J:3*K-2*D,COLORFF00FF;
超跌:IF(J0,10,0),COLORFFFF00;
BDDD:=LLV(J,2)=LLV(J,8);
重启:IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDJ20,30,0),COLOR00FF00;
加码:IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDBETWEEN(J,20,60),1,0),COLOR00FFFF,POINTDOT,LINETHICK0;
BDGD:=HHV(J,2)=HHV(J,8)ANDJ80;
小心:IF(CROSS(REF(J-0.01,1),J)ANDREF(BDGD,1),70,100),COLOR0000FF;
DRAWTEXT(加码,J,''★''),COLOR00FFFF;
  IF(JD,J,DRAWNULL),COLORFFEE44;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A1+1)CANDREF(DIF,A1+1)DIFANDCROSS(DIF,DEA);
A22:=BARSLAST(REF(CROSS(.K(9,3,3),KDJ.D(9,3,3)),1));
B2:=REF(C,A22+1)CANDREF(KDJ.K(9,3,3),A22+1)KDJ.K(9,3,3)ANDCROSS(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)CANDREF(RSI.RSI1(6,12,24),A3+1)RSI.RSI1(6,12,24)ANDCROSS(RSI.RSI1(6,12,24),RSI.RSI2(6,12,24));
DRAWTEXT(B1,DEA-0.20,''▲MACD底背''),COLORWHITE;
DRAWTEXT(B2,D-0.20,''●KDJ底背''),COLORFF00FF;
{DJ:=CROSS(J,D)ANDD20;
DRAWTEXT(DJ,J-0.3,''低金叉''),COLORCYAN;
MDJ:=CROSS(DIF,DEA)ANDDEA0;
DRAWTEXT(MDJ,DEA-0.3,''低金叉''),COLORGREEN;
DRAWTEXT(CROSS(DEA,DIF),DIF+0.3,''死叉''),COLORYELLOW;
DRAWTEXT(CROSS(D,J),J+0.3,''死叉''),COLORRED;}
A:=CROSS(DIF,DEA)ANDCROSS(K,D)ANDCROSS(J,D);
DRAWICON(A,LOW*0.98,1);
B4:CROSS(DIF,DEA)ANDCROSS(KDJ.K(9,3,3),KDJ.D(9,3,3));
DRAWTEXT(B4,L-0.20,''★金叉共振''),COLOR0099FF;
DRAWICON(CROSS(K,D),D,1);
DRAWICON(CROSS(D,K),D,2);
BA:=DEAREF(DEA,1);
BB:=SUM(BA,5)=4;
BC:=CO;
BD:=SUM(BC,5)=2;
BXG:FILTER(BBANDBDANDJREF(J,1)ANDREF(J,1)REF(J,2),3);
STICKLINE(BXG,HHV(J,60),HHV(J,60)-20,1,0),COLORRED;
SS:=EMA(C,11);
LL:=(EMA(C,1)+EMA(C,2)+EMA(C,3)+EMA(C,5))/4;
{短:EMA(LL,2),COLORGREEN,LINETHICK2;}
{长:EMA(SS,2),COLORMAGENTA,LINETHICK2;}
AA:=(C-LLV(C,10))/(HHV(C,10)-LLV(C,10));
(CROSS(AA,0.05)-1);
中:50,COLORCC9000;
  {中长趋势}
RSV1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
K1:=SMA(RSV1,6,1);
D1:=SMA(K1,6,1);
STICKLINE(EMA(D1,3)REF(EMA(D1,3),1),EMA(D1,3),REF(EMA(D1,3),1),3,0),COLORRED;
STICKLINE(EMA(D1,3)REF(EMA(D1,3),1),EMA(D1,3),REF(EMA(D1,3),1),3,0),COLORYELLOW;
  


  

  DIFZ:=EMA(C,12)-EMA(C,26);
DEAZ:=EMA(DIFZ,9);
Z:=8*(DIFZ-DEAZ);
RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*247.2-123.6;
SQX:=(C-MA(CLOSE,13))*10;
DIF:=EMA(MA(SQX,7),1);
DEA:=EMA(DIF,7);
MACD:=(DIF-DEA)*2;
STICKLINE(MACD0ANDMACDREF(MACD,1),MACD,0,0.1,0),COLORRED;
STICKLINE(MACD0ANDMACDREF(MACD,1),MACD,0,0.1,0),COLORWHITE;
STICKLINE(MACD0ANDMACDREF(MACD,1),MACD,0,0.1,0),COLORBLUE;
STICKLINE(MACD0ANDMACDREF(MACD,1),MACD,0,0.1,0),COLORBROWN;
K:SMA(SMA(RSV,3,1),3,1),COLORWHITE;
D:MA(EMA(K,3),3),COLORYELLOW;
J:3*K-2*D,COLORMAGENTA;
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A11+1)CANDREF(DIF,A11+1)DIFANDCROSS(DIF,DEA);
A12:=BARSLAST(REF(CROSS(.K,KDJ.D),1));
B2:=REF(C,A12+1)CANDREF(KDJ.K,A12+1)KDJ.KANDCROSS(KDJ.K,KDJ.D);
A13:=BARSLAST(REF(CROSS(RSI.RSI1,RSI.RSI2),1));
B3:=REF(C,A13+1)CANDREF(RSI.RSI1,A13+1)RSI.RSI1ANDCROSS(RSI.RSI1,RSI.RSI2);
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)CANDREF(DIF,C1+1)DIFANDCROSS(DEA,DIF);
C2:=BARSLAST(REF(CROSS(KDJ.D,KDJ.K),1));
D2:=REF(C,C2+1)CANDREF(KDJ.K,C2+1)KDJ.KANDCROSS(KDJ.D,KDJ.K);
C3:=BARSLAST(REF(CROSS(RSI.RSI2,RSI.RSI1),1));
D3:=REF(C,C3+1)CANDREF(RSI.RSI1,C3+1)RSI.RSI1ANDCROSS(RSI.RSI2,RSI.RSI1);
MACD底背:IF(B10,50,0),LINETHICK2,COLORRED;
DRAWTEXT(B10,50,''M底背''),COLORRED;
KDJ底背:IF(B20,65,0),LINETHICK2,COLORFF00FF;
DRAWTEXT(B20,65,''K底背''),COLORFF00FF;
RSI底背:IF(B30,80,0),LINETHICK2,COLORYELLOW;
DRAWTEXT(B30,80,''R底背''),COLORYELLOW;
MACD顶背:IF(D10,-50,0),LINETHICK2,COLOR00FF00;
DRAWTEXT(D10,-50,''M顶背''),COLOR00FF00;
KDJ顶背:IF(D20,-65,0),LINETHICK2,COLORFFCC66;
DRAWTEXT(D20,-65,''K顶背''),COLORFFCC66;
RSI顶背:IF(D30,-80,0),LINETHICK2,COLORWHITE;
DRAWTEXT(D30,-80,''R顶背''),COLORWHITE;
DRAWICON((CROSS(K,D)
ANDK0),REF(K,1),11);
DRAWICON((CROSS(D,K)ANDK0
),D*1.05,12);
DRAWICON(J(REF(J,1))ANDK(REF(K,1))ANDD(REF(D,1)
ANDJ0),REF(J,1),2);
DRAWICON(JREF(J,1)ANDKREF(K,1)AND
DREF(D,1)ANDJ0,REF(J,1),1);
DRAWICON(MACDREF(MACD,1)AND
REF(MACD,1)REF(MACD,2)AND
MACD0,MACD,2);
DRAWICON(MACDREF(MACD,1)AND
REF(MACD,1)REF(MACD,2)ANDMACD=0,MACD,1);
多方趋势(7)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1),2,1)),COLOR0000FF;
空方趋势EMA(MA(多方趋势,5),7)),COLORF0F000;
STICKLINE((多方趋势78)AND(多方趋势=空方趋势),78,多方趋势,5,1),COLOR00FF00;
STICKLINE((空方趋势=多方趋势),空方趋势,多方趋势,3,0),COLOR0000FF;
STICKLINE((空方趋势多方趋势),多方趋势,空方趋势,3,0),COLORF0F000;
STICKLINE((空方趋势14)AND(空方趋势多方趋势),多方趋势,20,3,0),COLOR00FFFF;
TJ:=FILTER((空方趋势14)AND(空方趋势多方趋势),6);
DRAWTEXT(TJ,40,''低吸''),COLORFFFFFF;
斋主空方趋势12)AND(空方趋势=多方趋势),COLOR00FFFF;
选金股:CROSS(多方趋势,空方趋势)AND(空方趋势22),COLOR0000FF;
E:=CROSS(83,RSI);
STICKLINE(E,75,85,4,0),COLOR00FF00;
DRAWTEXT(E,72,''逃顶'');
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100);
TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-REF(CLOSE,1)))),10);
HD:=(HIGH-REF(HIGH,1));
LD:=(REF(LOW,1)-LOW);
DMP:=SUM(IF(((HD0)AND(HDLD)),HD,0),10);
DMM:=SUM(IF(((LD0)AND(LDHD)),LD,0),10);
PDI:=((DMP*100)/TR1);
MDI:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
AV:=(RSI5+ADX);
DXR:=(((ADX+REF(ADX,5))/2)+RSI5);
WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));
NEWVOL:=(RSI5-WR10);
最佳买入:=(AV+NEWVOL);
最佳买入选股:IF(CROSS(最佳买入,0),61,0),STICK,COLORRED,LINETHICK4;
DRAWTEXT(CROSS(最佳买入,0),62,''最佳买入''),COLOR00FFFF;
AA:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
BB:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
CC:=EMA(AA,2);
DD:=EMA(BB,5);
TJ0:=CROSS(CC,DD);
上:=EMA(C,3);
中:=EMA(C,5);
下:=EMA(中,5);
TJ1:=CROSS(上,中);
TJ2:=上REF(上,1);
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,5)-REF(EMA(X1,5),1))*3.1416*10;
EMA3:=EMA(C,3);
TJ3:=BB51ANDEMA(X1,5)REF(EMA(X1,3),1);
STICKLINE(TJ1ANDTJ2ANDTJ0ANDTJ3,0,20,4,0)COLOR009999;
STICKLINE(TJ1ANDTJ2ANDTJ0ANDTJ3,0,35,3,0)COLOR00BBBB;
STICKLINE(TJ1ANDTJ2ANDTJ0ANDTJ3,0,45,1.5,0)COLOR00DDDD;
STICKLINE(TJ1ANDTJ2ANDTJ0ANDTJ3,0,50,0.6,0)COLOR00FFFF;
DRAWTEXT(TJ1ANDTJ2ANDTJ0ANDTJ3,48,''斋主全仓''),COLORRED;
斋主全仓:IF(CROSS(''斋主全仓'',0),0.9,0),STICK,COLORRED;
DRAWTEXT(CROSS(多方趋势,空方趋势)AND(空方趋势22),30,''金股''),COLOR00FFFF;
中间线:50,COLORFFFFFF,POINTDOT;
VAR11:=(CLOSE+HIGH+LOW)/3;
VAR2A1:=EMA(VAR11,10);
VAR3A:=REF(VAR2A1,1);
绿珠逃:IF(VAR2A1,0.1,DRAWNULL),COLORGREEN,LINETHICK9;
红珠买:IF(VAR2A1VAR3A,0.1,DRAWNULL),COLORRED,LINETHICK9;
黄珠卖:IF(VAR2A1VAR3A,0.1,DRAWNULL),COLOR00FFFF,LINETHICK9;
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|股海明灯官网 ( 京ICP备18020431号 )

GMT+8, 2024-11-26 19:35 , Processed in 0.098391 second(s), Total 12, Slave 11 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表