股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 2576|回复: 1
打印 上一主题 下一主题

请老师帮忙:编一个选股公式,感谢!!

[复制链接]

巡抚

Rank: 5Rank: 5

听众
6
跳转到指定楼层
楼主
发表于 2016-10-10 10:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
30爱心果
请老师帮忙:编一个选股公式“K"上穿”D",万分感谢!!

10,COLORRED;
20,COLOR00FF00,LINETHICK3,POINTDOT;
40,COLOR00FFFF,LINETHICK3,POINTDOT;
50,COLORRED,LINETHICK2;
60,COLORRED,LINETHICK3,POINTDOT;
80,COLOR00FFFF,LINETHICK3,POINTDOT;
90,COLOR00FF00;
100,COLORWHITE,LINETHICK2;
{进入异动区}
VAR7:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR8:=EMA(VAR7,30);
VAR9:=EMA(VAR8,30);
VAR10:=3*VAR8-2*VAR9;
势:=EMA(VAR10,5);
DRAWTEXT(CROSS(10,势),69,'进'),COLORYELLOW;
DRAWTEXT(CROSS(10,势),58,'入'),COLORFF00FF;
DRAWTEXT(CROSS(10,势),43,'异'),COLOR00C0FF;
DRAWTEXT(CROSS(10,势),31,'动[↓]'),COLORFFFF6F;
DRAWTEXT(CROSS(10,势),19,'区'), COLORB47DFF;
{长线持股}
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV
(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV
(H,BARSLAST(CROSS(RMA,NMA))+1),HHV
(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV
(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV
(L,BARSLAST(CROSS(NMA,RMA))+1),LLV
(L,BARSLAST(CROSS(NMA,RMA))+1),0);
买进:=(LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND
CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
STICKLINE(买进,0,70,2,0),COLOR008888;
STICKLINE(买进,0,70,1.5,0),COLOR00AAAA;
STICKLINE(买进,0,70,0.8,0),COLOR00DDDD;
STICKLINE(买进,0,70,0.3,0),COLOR00FFFF;
DRAWTEXT(买进,70,'★长线持股'),COLORRED,LINETHICK1;
{涨}
VAR1:=EMA(CLOSE,3);
VAR2:=EMA(CLOSE,21);
VAR3:=BARSLAST(CROSS(VAR2,VAR1))>15;
VAR4:=VOL>MA(VOL,5)*2 AND VOL<MA(VOL,5)*5;
VAR5:=CROSS(VAR1,VAR2) AND VAR4 AND VAR3;
DRAWTEXT(VAR5,80,'★涨'),COLORGREEN LINETHICK1;
涨:IF(VAR5,80,0),STICK,LINETHICK3,COLORGREEN;
{涨停}
ZT:=C/REF(C,1)>1.097;
STICKLINE(ZT,0,50,2,0),COLOR880088;
STICKLINE(ZT,0,50,1.5,0),COLORAA00AA;
STICKLINE(ZT,0,50,0.8,0),COLORCC00CC;
STICKLINE(ZT,0,50,0.3,0),COLORFF00FF;
{彩带}
K33:="KDJ.K"(33,3,3);
D33:="KDJ.D"(33,3,3);
STICKLINE((K33-D33>=0),K33,D33,10,0),COLORRED;
STICKLINE((K33-D33<0),K33,D33,10,0),COLORBLUE;
{涨停提示}
DRAWTEXT(ZT,45,'★涨停'),COLORF00FF0,LINETHICK1;
{KD}{KD没有未来函}
RSV:=(CLOSE-LLV(LOW,33))/(HHV(HIGH,33)-LLV(LOW,33))*100;
K:SMA(RSV,3,1),COLOR5599FF,LINETHICK2;
D:SMA(K,3,1),COLORWHITE LINETHICK2;
IF(K<REF(K,1),K,DRAWNULL),COLORGREEN,LINETHICK2;
IF(K>REF(K,1),K,DRAWNULL),COLOR00FFFF,LINETHICK2;
{KD相交红蓝球}
DRAWICON(CROSS(K,D),5,13);
DRAWICON(CROSS(D,K),95,14);
{逃}
DRAWTEXT(CROSS(80,RSI),95,'<--逃'),COLORWHITE LINETHICK1;
{顶}
VAR22:=1;
VAR23:=((((2*CLOSE)+HIGH)+LOW) / 4);
VAR24:=LLV(LOW,5);
VAR25:=HHV(HIGH,4);
B1:=(EMA((((VAR23-VAR24)/(VAR25-VAR24))*100),4)*VAR22);
B2:=(EMA(((0.667*REF(B1,1))+(0.333*B1)),2)*VAR22);
TJ4:=CROSS(B2,B1) AND REF(B1,1)>80;
DRAWTEXT(TJ4,93,'<--顶'),COLOR00FFFF LINETHICK1;
{红色狙击涨停线}
XX1:=CROSS(((-((100)*(HHV(HIGH,IF((IF((BARSCOUNT(CLOSE) > 7),(100)*((MA(CLOSE,7))/(LLV(MA(CLOSE,7),7)) - 1),1) > 0.35),6,65)) - CLOSE))/(HHV(HIGH,IF((IF((BARSCOUNT(CLOSE) > 7),
(100)*((MA(CLOSE,7))/(LLV(MA(CLOSE,7),7)) - 1),1) > 0.35),6,65)) - LLV(LOW,IF((IF((BARSCOUNT(CLOSE) > 7),
(100)*((MA(CLOSE,7))/(LLV(MA(CLOSE,7),7)) - 1),1) > 0.35),6,65)))))*((DATE < 20070110)),(-2));
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
XX2:=IF(W4 AND COUNT(W4,5)=1,20,0);
涨停:IF(XX1 AND XX2,65,0),COLORRED LINETHICK2;
DRAWTEXT(涨停>0.9,55,'狙击涨停'),COLORRED LINETHICK1;
{出水芙蓉}
MA111:=MA(CLOSE,20);
MA112:=MA(CLOSE,40);
MA113:=MA(CLOSE,60);
A11:=OPEN<MA111 OR OPEN<MA112 OR OPEN<MA113,COLORRED;
A12:=C>MAX(MA111,MAX(MA112,MA113)),COLORRED;
A13:=V/MA(V,30)>1.2,COLORRED;
A14:=C/REF(C,1)>1.049,COLORRED;
芙蓉:IF(A11 AND A12 AND A13 AND A14,50,0),COLORWHITE LINETHICK2;
DRAWTEXT(芙蓉>0.9,40,'今明买卖'),COLORWHITE LINETHICK1;

最佳答案

查看完整内容

RSV:=(CLOSE-LLV(LOW,33))/(HHV(HIGH,33)-LLV(LOW,33))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); CROSS(K,D);

爵★★★

Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21

听众
5
沙发
发表于 2016-10-10 10:33 | 只看该作者
RSV:=(CLOSE-LLV(LOW,33))/(HHV(HIGH,33)-LLV(LOW,33))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);

CROSS(K,D);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-11-24 05:41 , Processed in 0.137216 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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