万物公式网是一个专注于股票软件、股票公式资源分享的平台
微信公众号:万物狙击

网站首页 > 大智慧公式 正文

大智慧MACD改进指标公式

admin 2023-10-15 20:45:56 大智慧公式 259 ℃

大智慧MACD改进指标公式

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

DEA:EMA(DIFF,M),coloryellow;

MACD:3*(DIFF-DEA), COLORSTICK;

macdx:macd;

partline(macdx,macdx>ref(macdx,1),rgb(255,0,0),macdx

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)

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)diff and cross(dea,diff) and dea>0;

DRAWTEXT(FILTER(D1>0,5),diff+0.01,*MACD顶背离),COLORred;

{gd:=if(diff

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)

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)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)"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)"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;};

大智慧MACD改进指标公式选股公式如下:

>股票指标网

更多精彩内容,请关注公众号:实盘操手

其他说明

1、在下载过程遇到问题,请您 联系客服:QQ:2180737354  或  微信:xxs008000(常用)     备用微信:bsqj88886(常用号不能用的情况再加),我们会在第一时间修复和反馈。


2、本站所提供的股票指标等资源请细看说明,适合自己再购买下载,指标不包安装,不懂的人切勿购买,新手勿扰。所有指标仅供参考学习交流,没稳赚的指标,赢亏自负,如果觉着指标好用请支持正版,否则产生的一切后果将由下载用户自行承担,有部分股票指标资源为网上收集或仿制而来,若模板侵犯了您的合法权益,请来联系我们,我们会及时删除,给您带来的不便,我们深表歉意!


⇒⇒⇒点击加入通达信指标公式交流群QQ群