注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

随波踏浪

----------无痕

 
 
 

日志

 
 
 
 

KDJ研究  

2012-06-06 22:04:04|  分类: 公式研究 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
  

KI

{参数}

N1:=9;N2:=14;N3:=21;N4:=55;N5:=89;

{指标线};

RSV2:=EMA(((C+L)/2-LLV(L,N2))/(HHV(H,N2)-LLV(L,N2))*100,3),COLORFFFFFF;

K2:=EMA(RSV2,3);

RSV3:=EMA(((C+L)/2-LLV(L,N3))/(HHV(H,N3)-LLV(L,N3))*100,3);

长RSV55:=EMA(((C+L)/2-LLV(L,N4))/(HHV(H,N4)-LLV(L,N4))*100,3);

K4:=(EMA(长RSV55,3)+RSV3)/2,COLOR0000FF,LINETHICK1;

D4:=EMA(K4,3),COLORYELLOW;

K5:=EMA(((C+L)/2-LLV(L,89))/(HHV(H,89)-LLV(L,89))*100,5),COLOR9000FF;

D:=DRAWBAND(K4,RGB(89,133,55),10,RGB(34,55,233));

X1:DRAWBAND(K5,RGB(21,13,233),10,RGB(10,255,30));

{买卖条件};

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

RS2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;

J1:=SMA(RS1,3,1);

J2:=SMA(J1,3,1);

W1:=SMA(RS2,3,1);

W2:=SMA(W1,3,1);

出点准备:IF(CROSS(J2,J1) AND J2>85,70,99),LINETHICK2,COLOR00FF00;

WEN:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);

趋势线:=WEN,LINETHICK1;

买点准备:IF(趋势线<=10,30,1),LINETHICK2,COLORYELLOW;

{背离检测棒};

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

VA1:=HHV(DEA,53);

VA2:=LLV(DEA,55);

VA3:=DEA-(DIF-DEA);

UP:=IF(DIF>VA1 AND DEA=VA1,MAX(LLV(VA1,10),VA3),VA1);

DN:=IF(DIF<VA2 AND DEA=VA2,MIN(HHV(VA2,10),VA3),VA2);

底:IF(DIF<DN,-2,DRAWNULL),COLORRED,LINETHICK3;

顶:IF(DIF>UP,102,DRAWNULL),COLORRED,LINETHICK3;

{交易背景};

STICKLINE(C>0,90,100,6,0),COLORAF66CF;

STICKLINE(C>0,10,0,6,0),COLOR339933;

STICKLINE(趋势线>88,92,98,0.5,1),COLORGREEN;

STICKLINE(趋势线<=10,2,8,1,0),COLORRED;

DRAWICON(FILTER(CROSS(W2,W1) AND W2>81,10),K2,2);

强势区域震荡线:STICKLINE(ISLASTBAR,70,72,8,0),COLORFF80FF;

走势强弱分界线:STICKLINE(C>0,50,50,0.1,1),COLORGRAY;

反弹启动判别线:STICKLINE(ISLASTBAR,30,28,8,0),COLOR3333DD;

{指标线};

G5:K5,COLORFF1300,LINETHICK1;

G3:=K4,COLORFF0000,LINETHICK1;

G2:K2,COLOR008AFF,LINETHICK1;

G1:RSV2,COLORWHITE,LINETHICK1;

JJ:=DRAWBAND(G1,RGB(189,13,55),K2,RGB(13,189,55));

{END};


GK

{背景色}

Z1:=STICKLINE(C>0,-0.5,-2,6,0),COLOR306000;

{长期趋势}

年:SMA(EMA(SMA(((C+L)/2-LLV(L,250))/(HHV((H+C)/2,250)-LLV(L,250))*10,2,1),2),3,1),COLORFF5900,NODRAW;

半:=SMA(EMA(SMA(((C+L)/2-LLV(L,120))/(HHV((H+C)/2,120)-LLV(L,120))*10,2,1),2),3,1),COLOR00FF00,NODRAW;

X1:=DRAWBAND(半,RGB(89,144,55),1,RGB(13,89,189));

X2:DRAWBAND(年,RGB(21,13,233),1,RGB(233,13,21));

底部背离对照线:1,COLOR0000EE,LINETHICK1;

顶部背离对照线:9,COLOR008300;

 

{背离检测棒};

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

VA1:=HHV(DEA,53);

VA2:=LLV(DEA,55);

VA3:=DEA-(DIF-DEA);

UP:=IF(DIF>VA1 AND DEA=VA1,MAX(LLV(VA1,10),VA3),VA1);

DN:=IF(DIF<VA2 AND DEA=VA2,MIN(HHV(VA2,10),VA3),VA2);

底:IF(DIF<DN,-0.5,DRAWNULL),COLOR00FF00,LINETHICK3;

顶:IF(DIF>UP,10,DRAWNULL),COLOR0000FF,LINETHICK3;

 

{动态底部}

VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;

VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;

VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;

VAR5:=(VAR2+2*VAR3+3*VAR4)/6;

VAR6:=MA(VAR5,3);

MACD:=VAR6*5,COLORSTICK ,COLOR0000FF,NODRAW;

乖离:=VAR6,NODRAW;

{提醒:STICKLINE(VAR6<=-6,0,1,2,0),COLOR009AF9;

关注:STICKLINE(VAR6<=-8,0,1,1,0),COLOR00B7FA;

出击:STICKLINE(FILTER(VAR6<=-10,3),0,1,0.5,0),COLOR00FFFF;

买点:=STICKLINE(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0 ),9,1,0,0),COLOR0000CC;

警戒:=IF(VAR6<-6,-0.5,-2),LINETHICK1, COLORRED; }

 

{KDJ}

M:=3;

VAR1:=((C+2*L)/3-LLV(L,13))/(HHV(H,13)-LLV(L,13))*10;

RSV:=EMA(VAR1,M);

KK:=EMA(RSV,M),COLOR33FF33;

DD:=MA(KK,M),COLORFFFFFF,LINETHICK1;

 

{指标线}

G1:=年,COLORFF0800,NODRAW;

G2:=半,COLOR33FF33;

D2:=DD,COLOR0000FF,LINETHICK1;

D1:KK,COLOR0000FF,NODRAW;

K:RSV,COLORFFFFFF,LINETHICK2;

X3:=DRAWBAND(RSV,RGB(189,13,55),KK,RGB(13,89,189));

 

{交易信号线}

强势区域震荡线:STICKLINE(ISLASTBAR,7,7,20,1),COLOR008000;

走势强弱分界线:STICKLINE(C>0,5,5,0.1,0),COLORGRAY;

反弹启动判别线:STICKLINE(ISLASTBAR,3,3,20,1),COLOR3333DD;

{END};

 

K1

N:=14;M:=3;

 

{交易背景};

强势区域震荡线:STICKLINE(ISLASTBAR,70,70,20,1),COLORFFFFFF;

走势强弱分界线:=STICKLINE(C>0,50,50,0.1,0),COLORGRAY;

反弹启动判别线:STICKLINE(ISLASTBAR,30,30,20,1),COLOR33FFDD;

 

{指标线};

LOWV:=LLV(LOW,N);

HIGHV:=HHV(HIGH,N);

RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M);

K:EMA(RSV,M),COLORWHITE,LINETHICK2;

D:MA(K,M),COLOR00FFFF;

 

{背离检测棒};

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

VA1:=HHV(DEA,53);

VA2:=LLV(DEA,55);

VA3:=DEA-(DIF-DEA);

UP:=IF(DIF>VA1 AND DEA=VA1,MAX(LLV(VA1,10),VA3),VA1);

DN:=IF(DIF<VA2 AND DEA=VA2,MIN(HHV(VA2,10),VA3),VA2);

底:IF(DIF<DN,-3,DRAWNULL),COLOR00FF00,LINETHICK3;

顶:IF(DIF>UP,103,DRAWNULL),COLOR0000FF,LINETHICK3;

 

K2

N:=9;M:14;N1:=6;N2:=8;

趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),

COLORYELLOW;

DRAWBAND(趋势,RGB(155,50,50),50,RGB(0,100,50));

强:IF(趋势>50,趋势,DRAWNULL),COLORRED;

弱:IF(趋势<50,趋势,DRAWNULL),COLORGREEN;

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

K:=SMA(RSV,3,1);

D:=SMA(K,3,1);

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

CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));

DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);

DEA:=EMA(DIFF,6);

MACD:=2*(DIFF-DEA);

转点:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);

STICKLINE(转点=1,50,50,2,0),COLORYELLOW;

STICKLINE(转点=0,50,50,2,0),COLORCYAN;

STICKLINE(C,90,90,1,0),COLORYELLOW;

STICKLINE(C,10,10,1,0),COLORCYAN;

 

K3

VAR1:=HHV(HIGH,13)-LLV(LOW,13);

VAR2:=HHV(HIGH,13)-CLOSE;

VAR3:=CLOSE-LLV(LOW,13);

VAR4:=VAR2/VAR1*100-70;

VAR5:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;

VAR6:=(HIGH+LOW+OPEN+CLOSE)/4;

VAR7:=SMA(VAR3/VAR1*100,3,1);

VAR8:=LLV(LOW,34);

VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);

VARA:=IF(VAR9>100,VAR9-100,0);

VARB:=HHV(HIGH,34);

VARC:=EMA((VAR6-VAR8)/(VARB-VAR8)*100,13);

VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);

青春之歌:EMA(VARD,10);

STICKLINE(VARC-VARD>0,VARC,VARD,8,1),COLOR0000FF;

STICKLINE(VARC-VARD<0,VARC,VARD,8,0),COLOR00FF00;

X1:=DRAWICON(CROSS(VARC,VARD)AND VARC<22 ,0,17);

X2:=DRAWICON(CROSS(VARD,VARC),100,6);

 

K5

STICKLINE(C>0,0,100,15,0),COLOR7C221C;

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

RSV2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;

WEN:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);

J1:=SMA(RSV1,3,1);J2:=SMA(J1,3,1);

W1:=SMA(RSV2,3,1);W2:=SMA(W1,3,1);

强弱界线:49,POINTDOT,LINETHICK3,COLOR9966CC;

见顶信号:100,COLORCCFF00;

 

趋势线:=WEN,LINETHICK2;

出点准备: IF(CROSS(J2,J1) AND J2>85,70,100),LINETHICK2,COLOR00FF00;

买点准备:IF(趋势线<=10,30,0),LINETHICK2,COLORYELLOW;

 

STICKLINE(趋势线>88,100,80,3,1),COLORGREEN;

STICKLINE(趋势线<=10,0,20,3,1),COLORYELLOW;

STICKLINE(COUNT(趋势线<REF(趋势线,1) AND 趋势线<10,2)=2 ,0,20,3,0),COLORRED;

STICKLINE(CROSS(J2,J1) AND J2>85,100,80,3,0),COLORGREEN;

 

G3:W2,LINETHICK2,COLORCYAN;

G2:W1,LINETHICK1,COLORWHITE;

G1:WEN,LINETHICK2,COLORFF00FF;

  评论这张
 
阅读(296)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017