找回密码
 立即注册

QQ登录

只需一步,快速开始

广告载入中...
查看: 6090|回复: 57

通达信顶底如神,买卖利器指标

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

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

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

×
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(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),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),4,0),STICK,COLOR00FFFF,LINETHICK2;
VARA1:=SMA(买入选股,3,1);
VARA2:=SMA(VARA1,3,1),COLOR0000FF;
VARA3:=SMA(VARA2,3,1),COLOR00FFFF;
建仓买点:IF(CROSS(VARA2,VARA3) AND (VARA2<40),5,0* 10000),COLOR0000FF,LINETHICK1;
STICKLINE(建仓买点,0,1.5,6,0),COLORFF80FF;
STICKLINE(建仓买点,0.5,2.8,2,0),COLOR3000FF;
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
最佳买入时机: IF(CROSS(J,3),1,0),STICK,COLORFFFF00;
STICKLINE(最佳买入时机,0,1,3,0),COLOR009999;
STICKLINE(最佳买入时机,0,1,2,0),COLOR00DDDD;
STICKLINE(最佳买入时机,0,1,1,0),COLOR00FFFF;
机构建仓: IF(最佳买入<5,-0.5,0),STICK,COLOR00FF00,LINETHICK1;
机构建仓日:STICKLINE(机构建仓,0,-1,4,1),COLOR00FF00,LINETHICK5;
趋势:3*SMA((CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK2,COLORFF99FF,NODRAW;
备钱: IF(趋势<=20,-0.8,0),COLORD0D0D0,STICK,LINETHICK3;
快买: IF(趋势<=10,1,0),COLORFF38FF,STICK,LINETHICK3;
BIAS1:=(C-MA(C,6))/MA(C,6)*100,COLORFFDDCC;
BIAS2C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;
BIAS3:=(C-MA(C,26))/MA(C,26)*100,COLORFFFFFF,LINETHICK1;
乖离BIAS1+2*BIAS2+3*BIAS3)/6,COLOR00FFFF;
乖离超限:MA(乖离,3),COLORFF80FF;
STICKLINE(CROSS(乖离,乖离超限) AND 乖离超限<-9,-4,0,1,1),COLORFFFFFF;
STICKLINE(CROSS(乖离超限,乖离) AND 乖离>10,6,0,3,0),COLORFF88FF;
DRAWBAND(MA(乖离,1),RGB(240,120,40),MA(乖离超限,1),RGB(256,200,20));
警跌:IF(BIAS2<REF(BIAS2,1),BIAS2,DRAWNULL),COLORFF6128,LINETHICK3;
回升:IF(BIAS2>REF(BIAS2,1),BIAS2,DRAWNULL),COLOR00FFFF,LINETHICK3;
R:SMA(MAX(CLOSE- REF(C,1),0),6,1)/SMA(ABS(CLOSE- REF(C,1)),6,1)*100,COLORFFCCFF,NODRAW;
R2:SMA(MAX(CLOSE- REF(C,1),0),13,1)/SMA(ABS(CLOSE- REF(C,1)),13,1)*100,COLOR00CCFF,NODRAW;
STICKLINE(CROSS(R2,R) AND R2>78,2,0,3,-1),COLOR30FFFF;
CC:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD:=L<MA(C,5)*0.921;
EE:=V<MA(V,5)*1.5;
老鼠仓:=(L<(AMOUNT/V)*0.9) AND CC AND DD AND EE,LINETHICK0,COLOR0099FF;
DRAWTEXT(老鼠仓,-5,'老鼠仓'),COLORFFFFFF;
选底:TROUGHBARS(3,15,1)<4,NODRAW;
DRAWTEXT(FILTER(选底=1,3),-2,'底部'),COLOR00FF00;
头部:=IF((PEAKBARS(3,15,1)<10)=1,2,0);
快逃:=IF(头部>REF(头部,1),H,0),COLORWHITE,NODRAW;
DRAWTEXT(快逃=H,6,'头部'),COLOR0000FF,LINETHICK1;
STICKLINE(CROSS(乖离,BIAS1) AND BIAS2>15,乖离,0,1,0),COLOR3300FF;
DRAWICON(CROSS(乖离,BIAS1*0.382),-1,1),COLORGREEN;
{公式在线网分享:http://www.gszx.com.cn/html/tongdaxingongshi/gs213001.html}

评分

1

查看全部评分

本帖被以下淘专辑推荐:

发表于 2016-7-6 06:42 | 显示全部楼层
本帖最后由 p467327843 于 2016-7-6 06:57 编辑

有图会更好,谢谢啦。测试通过。
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(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),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),4,0),STICK,COLOR00FFFF,LINETHICK2;
VARA1:=SMA(买入选股,3,1);
VARA2:=SMA(VARA1,3,1),COLOR0000FF;
VARA3:=SMA(VARA2,3,1),COLOR00FFFF;
建仓买点:IF(CROSS(VARA2,VARA3) AND (VARA2<40),5,0* 10000),COLOR0000FF,LINETHICK1;
STICKLINE(建仓买点,0,1.5,6,0),COLORFF80FF;
STICKLINE(建仓买点,0.5,2.8,2,0),COLOR3000FF;
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
最佳买入时机: IF(CROSS(J,3),1,0),STICK,COLORFFFF00;
STICKLINE(最佳买入时机,0,1,3,0),COLOR009999;
STICKLINE(最佳买入时机,0,1,2,0),COLOR00DDDD;
STICKLINE(最佳买入时机,0,1,1,0),COLOR00FFFF;
机构建仓: IF(最佳买入<5,-0.5,0),STICK,COLOR00FF00,LINETHICK1;
机构建仓日:STICKLINE(机构建仓,0,-1,4,1),COLOR00FF00,LINETHICK5;
趋势:3*SMA((CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK2,COLORFF99FF,NODRAW;
备钱: IF(趋势<=20,-0.8,0),COLORD0D0D0,STICK,LINETHICK3;
快买: IF(趋势<=10,1,0),COLORFF38FF,STICK,LINETHICK3;
BIAS1:=(C-MA(C,6))/MA(C,6)*100,COLORFFDDCC;
BIAS2:=(C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;
BIAS3:=(C-MA(C,26))/MA(C,26)*100,COLORFFFFFF,LINETHICK1;
乖离:=(BIAS1+2*BIAS2+3*BIAS3)/6,COLOR00FFFF;
乖离超限:MA(乖离,3),COLORFF80FF;
STICKLINE(CROSS(乖离,乖离超限) AND 乖离超限<-9,-4,0,1,1),COLORFFFFFF;
STICKLINE(CROSS(乖离超限,乖离) AND 乖离>10,6,0,3,0),COLORFF88FF;
DRAWBAND(MA(乖离,1),RGB(240,120,40),MA(乖离超限,1),RGB(256,200,20));
警跌:IF(BIAS2<REF(BIAS2,1),BIAS2,DRAWNULL),COLORFF6128,LINETHICK3;
回升:IF(BIAS2>REF(BIAS2,1),BIAS2,DRAWNULL),COLOR00FFFF,LINETHICK3;
R:SMA(MAX(CLOSE- REF(C,1),0),6,1)/SMA(ABS(CLOSE- REF(C,1)),6,1)*100,COLORFFCCFF,NODRAW;
R2:SMA(MAX(CLOSE- REF(C,1),0),13,1)/SMA(ABS(CLOSE- REF(C,1)),13,1)*100,COLOR00CCFF,NODRAW;
STICKLINE(CROSS(R2,R) AND R2>78,2,0,3,-1),COLOR30FFFF;
CC:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD:=L<MA(C,5)*0.921;
EE:=V<MA(V,5)*1.5;
老鼠仓:=(L<(AMOUNT/V)*0.9) AND CC AND DD AND EE,LINETHICK0,COLOR0099FF;
DRAWTEXT(老鼠仓,-5,'老鼠仓'),COLORFFFFFF;
选底:TROUGHBARS(3,15,1)<4,NODRAW;
DRAWTEXT(FILTER(选底=1,3),-2,'底部'),COLOR00FF00;
头部:=IF((PEAKBARS(3,15,1)<10)=1,2,0);
快逃:=IF(头部>REF(头部,1),H,0),COLORWHITE,NODRAW;
DRAWTEXT(快逃=H,6,'头部'),COLOR0000FF,LINETHICK1;
STICKLINE(CROSS(乖离,BIAS1) AND BIAS2>15,乖离,0,1,0),COLOR3300FF;
DRAWICON(CROSS(乖离,BIAS1*0.382),-1,1),COLORGREEN;
回复

使用道具 举报

发表于 2016-7-5 22:35 | 显示全部楼层
测试通过了,两个错误地方分别是   BIAS2C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;改为BIAS2:=(C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;乖离BIAS1+2*BIAS2+3*BIAS3)/6,COLOR00FFFF;改为乖离BIAS1+2*BIAS2+3*BIAS3)/6,COLOR00FFFF;
回复

使用道具 举报

发表于 2016-8-21 01:13 | 显示全部楼层
当前公式 : 顶底如神,买 (指标画线公式)  
错误句 :
BIAS2:=(C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1
详细信息 :  
错误起始位置 : 1725 ; 长度: 2
回复

使用道具 举报

发表于 2016-7-5 21:52 | 显示全部楼层
谢谢楼主的无私分享!
回复

使用道具 举报

发表于 2016-7-5 22:21 | 显示全部楼层
测试通不过?
回复

使用道具 举报

发表于 2016-7-5 22:23 | 显示全部楼层
BIAS2C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;这句话测试通不过
回复

使用道具 举报

发表于 2016-7-6 20:45 | 显示全部楼层
学习学习学习
回复

使用道具 举报

发表于 2016-7-7 07:26 | 显示全部楼层
谢谢楼主的无私分享!
回复

使用道具 举报

发表于 2016-7-8 16:26 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2016-7-8 17:12 | 显示全部楼层
测试通不过
回复

使用道具 举报

发表于 2016-7-11 19:13 | 显示全部楼层
向高手学习,向高手看齐!
回复

使用道具 举报

发表于 2016-7-17 20:27 | 显示全部楼层
学长 通不过
回复

使用道具 举报

发表于 2016-8-7 09:31 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2016-8-9 19:31 | 显示全部楼层
老师辛苦了,但你的程序有问题,不通过!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-23 06:33 , Processed in 0.115880 second(s), Total 15, Slave 14 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

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