看股吧 www.kanguba.com [今日大盘指数 欧美全球股市行情 股票公式查询网站] 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
看股吧
看股吧股票网-今日大盘指数 欧美全球股市行情 股票公式查询网站
股票查询: 行情分析 DDX指标 走势点评 股票公告 大事 主力持仓 股权质押 分红 大小非 十大股东 股本结构 高管持股 研报 高管 主营 龙虎榜 股吧
当前位置: 看股吧 > 股票公式 > 大智慧公式
股票公式搜索:

大智慧MACD改进指标公式

2020/12/19 18:47:11

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.ka nguba.com

其它股票公式列表
看股吧查股导航:个股行情分析查询 股票DDX指标查询 走势点评 股票公告查询 大事提醒 股权质押查询 股票分红查询 解禁查询 高管持股 高管查询
华软科技 002453+9.99% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
意华股份 002897+9.98% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
陕西黑猫 601015+9.98% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
新疆众和 600888+9.98% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
韩建河山 603616+9.98% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
鹏欣资源 600490+9.98% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
英飞特 300582+9.97% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
宏盛股份 603090+9.97% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
格力地产 600185+9.96% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
芭田股份 002170+9.95% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
看股网力求但不保证数据的完全准确,不对因网站全部内容或部分内容而引致的盈亏承担任何责任,本站所有内容仅供参考。
本站不提供任何股票服务,站内广告不代表看股吧的观点,由此引起的一切法律责任均与本站无关,请股民自行识别判断,谨慎投资,预防上当受骗!
联系我们:nlfen9@hotmail.com
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-121