• 欢迎访问第一股票指标公式网,汇集目前最全,最新的各种股票公式,股票指标公式,公式下载等股票软件指标公式源码

把乘风老师的MACD改成通达信能用的

常见公式 第一股票指标公式网 2周前 (10-15) 5次浏览 0个评论 扫描二维码

股友提问要求:

171415.com解答:

 网友求助:

DIF:(EMA(CLOSE,12) – EMA(CLOSE,26)),Colorred,LINETHICK,PRECISION2;
DEA:EMA(DIF,9),COLORYELLOW,LINETHICK,PRECISION2;
MACD:2*(DIF-DEA),COLORFFFFFF,LINETHICK,PRECISION2;
RSV14:=(CLOSE – LLV(LOW,14))/(HHV(HIGH,14) – LLV(LOW,14))-0.5;
K14:=SMA(RSV14,3,1),COLORFF00FF,LINETHICK,PRECISION2;
D14:=SMA(K14,3,1),COLORB00000,LINETHICK,PRECISION2;
J14:=3*K14-2*D14;

FILLRGN(DIF>0 AND DIF>=DEA,DIF,DEA),Color000088;
FILLRGN(DIF>0 AND DIF<DEA,DIF,DEA),COLORGRAY;
FILLRGN(DIF<=0 AND DIF<DEA,DIF,DEA),Color33FF33;
FILLRGN(DIF<=0 AND DIF>=DEA,DIF,DEA),ColorFFCCDD;

STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,2,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR0000BB;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLOR0000DD;

STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,2,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORDDDDDD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLORFFFFFF;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,3,0),COLOR3377AA;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,2,0),COLOR3388BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLOR4499CC;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLOR5599DD;

STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORFF3300;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,2,0),COLORFF5500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF7700;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLORFF9900;
MACDXG2:=REF(count(dif>0 AND MACD<0 AND macd<ref(macd,1),4)=4,1) AND MACD>REF(MACD,1);
STICKLINE(MACDXG2,macd,0,8,0),COLORred;
TRlsx1:= MAX(MAX((hhv(dif,13)-Llv(dif,13)),ABS(REF(dif,1)-hhv(dif,13))),ABS(REF(dif,1)-llv(dif,13)));
trlsx2:=ema(trlsx1,13);
trlsx3:=ref(dif,1)-ref(trlsx2,1);
支撑:hhv(trlsx3,13),PRECISION2,COLORffffff;

PARTLINE(dea<=ref(DEA,1),Dea),COLORff0000,LINETHICK1;
PARTLINE(dea>ref(DEA,1),Dea),COLORYELLOW,LINETHICK1;
PARTLINE(DIF>ref(dif,1),DIF),Colorred,LINETHICK1;
PARTLINE(DIF<=ref(dif,1),DIF),Color008080,LINETHICK1;

difk:=ema(dif,3);
difd:=ema(difk,3);
DKK:4*dif-3*dea,COLORff00ff,PRECISION2,LINETHICK;
DDD:ema(dkk,5),COLOR2588ff,PRECISION2,LINETHICK;
PARTLINE(DKK>ref(DKK,1),DKK),COLORff00ff,LINETHICK1,LINEDOT;
PARTLINE(DKK<=ref(DKK,1),DKK),COLORffffff,LINETHICK1,LINEDOT;
PARTLINE(DDD>ref(DDD,1),DDD),COLOR2255ff,LINETHICK1,LINEDOT;
PARTLINE(DDD<=ref(DDD,1),DDD),COLOR33ff33,LINETHICK1,LINEDOT;

MACDXG1:=ref(cross(0,macd),3) and count(dif>0 and macd<ref(macd,1),4)=4 ;
DRAWICON(MACDXG1,macd*1.15,1),ALIGN;

KDJXG:=REF(COUNT(J14<REF(J14,1),5)>=3,1) AND REF(J14,1)<-0.4 AND J14>REF(J14,1);

DRAWICON(C AND FILTER(KDJXG,3),macd*1.35,8),ALIGN;
DRAWICON(C AND FILTER(KDJXG,3),macd*1.4,8),ALIGN;
DRAWICON(C AND FILTER(KDJXG,3),macd*1.45,8),ALIGN;

 
解答如下:
DIF:(EMA(CLOSE,12) – EMA(CLOSE,26)),COLORRED,LINETHICK1;
DEA:EMA(DIF,9),COLORYELLOW,LINETHICK1;
MACD:2*(DIF-DEA),COLORFFFFFF,LINETHICK1;
RSV14:=(CLOSE – LLV(LOW,14))/(HHV(HIGH,14) – LLV(LOW,14))-0.5;
K14:=SMA(RSV14,3,1),COLORFF00FF,LINETHICK;
D14:=SMA(K14,3,1),COLORB00000,LINETHICK;
J14:=3*K14-2*D14;
DRAWBAND(DIF,RGB(136,0,0),DEA,RGB(128,128,128));
DRAWBAND(IF(DIF<0,DIF,DRAWNULL),RGB(221,204,255),IF(DIF<0,DEA,DRAWNULL),RGB(51,255,51));
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR0000BB;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLOR0000DD;

STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORDDDDDD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLORFFFFFF;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLOR3377AA;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLOR3388BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLOR4499CC;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLOR5599DD;

STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLORFF3300;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLORFF5500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF7700;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLORFF9900;

MACDXG2:=REF(COUNT(DIF>0 AND MACD<0 AND MACD<REF(MACD,1),4)=4,1) AND MACD>REF(MACD,1);
STICKLINE(MACDXG2,MACD,0,5,0),COLORRED;
TRLSX1:= MAX(MAX((HHV(DIF,13)-LLV(DIF,13)),ABS(REF(DIF,1)-HHV(DIF,13))),ABS(REF(DIF,1)-LLV(DIF,13)));
TRLSX2:=EMA(TRLSX1,13);
TRLSX3:=REF(DIF,1)-REF(TRLSX2,1);
支撑:HHV(TRLSX3,13),COLORFFFFFF;

IF(DEA<=REF(DEA,1),DEA,DRAWNULL),COLORFF0000,LINETHICK1;
IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK1;
IF(DIF<=REF(DIF,1),DIF,DRAWNULL),COLOR008080,LINETHICK1;

DIFK:=EMA(DIF,3);
DIFD:=EMA(DIFK,3);
DKK:4*DIF-3*DEA,COLORFF00FF,LINETHICK1;
DDD:EMA(DKK,5),COLOR2588FF,LINETHICK1;
IF(DKK>REF(DKK,1),DKK,DRAWNULL),COLORFF00FF,LINETHICK1;
IF(DKK<=REF(DKK,1),DKK,DRAWNULL),COLORFFFFFF,LINETHICK1;
IF(DDD>REF(DDD,1),DDD,DRAWNULL),COLOR2255FF,LINETHICK1;
IF(DDD<=REF(DDD,1),DDD,DRAWNULL),COLOR33FF33,LINETHICK1;

MACDXG1:=REF(CROSS(0,MACD),3) AND COUNT(DIF>0 AND MACD<REF(MACD,1),4)=4 ;
DRAWICON(MACDXG1,MACD*1.15,5);

KDJXG:=REF(COUNT(J14<REF(J14,1),5)>=3,1) AND REF(J14,1)<-0.4 AND J14>REF(J14,1);

DRAWICON(C AND FILTER(KDJXG,3),MACD*1.35,1);
DRAWICON(C AND FILTER(KDJXG,3),MACD*1.4,1);
DRAWICON(C AND FILTER(KDJXG,3),MACD*1.45,1);
 

 


第一股票指标公式网所有股票公式及文章来源于网络仅供学习研究,请勿以此为依据进行股票交易。 版权投诉邮箱:313707241@qq.com 投放广告公式交流 QQ:313707241
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址