投股票网 www.tou18.cn [今日股市行情 股市在线查询 股票大盘行情] 股市有风险 投资需谨慎 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
投股票网
今日股市行情 股市在线查询 股票大盘行情
个股查询: 资金行情 DDX查询 大智慧超赢 同花顺DDE 千股千评 最新提示 股票公告 投资要点 评级查询 大小非 股东 增发配股 股权 高管 股票概况
当前位置: 投股票网 > 股市公式下载 > 大智慧公式
股市公式查询:

大智慧MACD改进指标公式

2020/12/19 19:18:27

SHORT:=5;
LONG:=25;
M:=10;
0;
DIFF:=(EMA(CLOSE,SHORT)/EMA(CLOSE,LONG)-1)*100;
partline(diff,diff>ref(diff,1),rgb(255,0,0),diff<ref(diff,1),rgb(0,255,0)),linethick2;
DEA:EMA(DIFF,M),coloryellow;
MACD:3*(DIFF-DEA), COLORSTICK;
macdx:macd;
partline(macdx,macdx>ref(macdx,1),rgb(255,0,0),macdx<ref(macdx,1),rgb(0,255,0));
Var1:=EMA(CLOSE,35)-EMA(CLOSE,17);
Var2:=EMA(Var1,5);
jgdx:TROUGHBARS(3,10,1)<1 AND CROSS(Var1,Var2),colorred;
{zds:=hhvall(macdx);
RSV:=((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*zds)-(zds/2);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
Jb:=3*K-2*D;
zdjb:=hhvall(jb);
j:jb*zds/zdjb;
DRAWTEXTABS(40,5,'图中白色线为KDJ的J线'),Colorred;}
{difa:=abs(diff);
diff角度:=atan((difa/ref(difa,2)-1)*100)*180/3.1415926535;
DRAWTEXTABS(40,10,'■diff角度:'+NUMTOSTRN(diff角度,2)+''),ColorFFFF00;}
{drawtextabs(440,10,'!!注意: 日K线的bbiday的颜色变化和MACD的背离信号!!'),colorred;}
{diffday:"macd.diff#day";}
jc:=cross(diff,dea);
sc:=cross(dea,diff);
djck:=(count(jc,barslast(diff>0)));
ssjc:=(count(jc,barslast(diff<0)));
usck:=(count(sc,barslast(diff<0)));
jcd:=if(jc,dea,0);{金叉点}
scd:=if(sc,dea,0);{死叉点}
drawtext(jc and diff<0,jcd,numtostr(djck)+'金叉'),colorred;
drawtext(jc and diff>0,jcd,numtostr(ssjc)+'金叉'),colorred;
drawtext(sc and diff>0,scd,numtostr(usck)+'死叉'),colorgreen;
A1:=BARSLAST(ref(cross(diff,dea) and dea<0,1));
B1:=ref(c,A1+1)>c and ref(diff,A1+1)<diff and cross(diff,dea) and dea<0;
DRAWTEXT(FILTER(B1>0,5),diff-0.01,'*MACD底背离'),COLOryellow;
C1:=BARSLAST(ref(cross(dea,diff),1)) and dea>0;
D1:=ref(c,C1+1)<c and ref(diff,C1+1)>diff and cross(dea,diff) and dea>0;
DRAWTEXT(FILTER(D1>0,5),diff+0.01,'*MACD顶背离'),COLORred;
{gd:=if(diff<ref(diff,1) and ref(diff,1)<ref(diff,2) and ref(diff,2)>ref(diff,3) and ref(diff,3)>ref(diff,4),ref(diff,2),0);
gdk:=count(gd>0,barslast(diff<0));
drawtext(gd>0 and diff>0,ref(diff,2),numtostr(gdk)+'拐点'),coloryellow;}
{0007--MACD金死叉间最大、最小值}
A1:=CROSS("MACD.MACD",0);
A2:=BARSLAST(A1);
A3:=HHVBARS("MACD.MACD" ,A2+1);
A4:=BACKSET(REF(A3>=1,1) AND "MACD.MACD"<0,A3);
A5:=BACKSET(REF(A4=0,1) AND A4=1,2);
高值:IF(FILTER(A5,2),"MACD.MACD",0);
DRAWICON(高值>0,高值,4);
B1:=CROSS(0,"MACD.MACD");
B2:=BARSLAST(B1);
B3:=LLVBARS("MACD.MACD" ,B2+1);
B4:=BACKSET(REF(B3>=1,1) AND "MACD.MACD">0,B3);
B5:=BACKSET(REF(B4=0,1) AND B4=1,2);
低值:IF(FILTER(B5,2),"MACD.MACD",0);
DRAWICON(低值<0,低值,5);
{A1:=BARSLAST(ref(cross(diff,dea),1));
B1:=ref(c,A1+1)>c and ref(diff,A1+1)<diff and cross(diff,dea);
DRAWTEXT(FILTER(B1>0,5),0,'MACD'),COLORGREEN,ALIGN0;;
Stickline(FILTER(B1>0,5),-1,0,1,0),COLORGREEN;
{A2:=BARSLAST(ref(cross("kdj.k","kdj.d"),1));
B2:=ref(c,A2+1)>c and ref("kdj.k",A2+1)<"kdj.k" and cross("kdj.k","kdj.d");
DRAWTEXT(FILTER(B2>0,5),0.5,'KDJ'),COLORYELLOW,ALIGN0;;
Stickline(FILTER(B2>0,5),0.5,-1,1,0),COLORYELLOW;
A3:=BARSLAST(ref(cross("RSI.RSI1","RSI.RSI2"),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1",A3+1)<"RSI.RSI1" and cross("RSI.RSI1","RSI.RSI2");
DRAWTEXT(FILTER(B3>0,5),-0.25,'RSI'),COLORCYAN,ALIGN0;;
Stickline(FILTER(B3>0,5),-1,-0.25,1,0),COLORCYAN;}
{C1:=BARSLAST(ref(cross(dea,diff),1));
D1:=ref(c,C1+1)<c and ref(diff,C1+1)>diff and cross(dea,diff);
DRAWTEXT(FILTER(D1>0,5),-0.5,'MACD'),COLORwhite,ALIGN0;
Stickline(FILTER(D1>0,5),-0.5,1,1,0),COLORwhite;
{C2:=BARSLAST(ref(cross("kdj.d","kdj.k"),1));
D2:=ref(c,C2+1)<c and ref("kdj.k",C2+1)>"kdj.k" and cross("kdj.d","kdj.k");
DRAWTEXT(FILTER(D2>0,5),0,'KDJ'),COLORwhite,ALIGN0;
Stickline(FILTER(D2>0,5),1,0,1,0),COLORwhite;
C3:=BARSLAST(ref(cross("RSI.RSI2","RSI.RSI1"),1));
D3:=ref(c,C3+1)<c and ref("RSI.RSI1",C3+1)>"RSI.RSI1" and cross("RSI.RSI2","RSI.RSI1");
DRAWTEXT(FILTER(D3>0,5),0.25,'RSI'),COLORMAGENTA,ALIGN0;;
Stickline(FILTER(D3>0,5),1,0.25,1,0),COLORMAGENTA;};

投股 票网 www.tou18 .cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
海泰新光 688677+4.29% 评股 实时DDX 大智慧 最新消息 题材分析 股权
晶丰明源 688368+4.28% 评股 实时DDX 大智慧 最新消息 题材分析 股权
*ST中葡 600084+4.27% 评股 实时DDX 大智慧 最新消息 题材分析 股权
渝开发 000514+4.27% 评股 实时DDX 大智慧 最新消息 题材分析 股权
阳谷华泰 300121+4.26% 评股 实时DDX 大智慧 最新消息 题材分析 股权
亚邦股份 603188+4.26% 评股 实时DDX 大智慧 最新消息 题材分析 股权
东风股份 601515+4.25% 评股 实时DDX 大智慧 最新消息 题材分析 股权
航发控制 000738+4.24% 评股 实时DDX 大智慧 最新消息 题材分析 股权
中控技术 688777+4.23% 评股 实时DDX 大智慧 最新消息 题材分析 股权
长青集团 002616+4.21% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120