同花顺MACD美颜版指标公式

 

DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK1;
DEA:EMA(DIFF,9),COLOrffaa00,LINETHICK1;
macd:=2*(DIFF-DEA);
STICKLINE(MacD>=0,MACD,0,4,1),colorred,LINETHICK3;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),coloryellow,LINETHICK3;
STICKLINE(MACD<0,MACD,0,4,1),colorlired,LINETHICK3;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),colorligreen,LINETHICK3;
X1:IF(diff<0,diff,0),COLOR0000FF,LINETHICK1;
X2:IF(diff<0,0,diff),colormagenta,LINETHICK1;
X3:IF(diff<dea,diff,dea),COLOR00ff00,linethick1;
X4:IF(diff>dea,dea,dea),linethick1,COLORffbb11;
低位金叉:=crOSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,DEA*0.86,DEA*0.66,10,0),colormagenta;
DRAWTEXT(低位金叉,dea*0.96,' ↖【低位金叉】'),colormagenta;
GPW:=COUNT(CROSS(DIFF,DEA),BArslAST(DEA>=0));
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,DEA*0.96,DEA*0.76,10,0),coloryellow;
DRAWICON(二次金叉,dea*1.1,'BUY') ;
DRAWTEXT(二次金叉,DEA*1.30,' ↖【二次金叉】'),coloryellow;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,DEA*1.09,DEA*0.86,10,0),Color6600FF;
DRAWLINE(A1=0,DEA,底背离,DEA,0),colorred,linethick2;
DRAWTEXT(底背离,DEA*1.60,' ↖【多方炮台】'),Color6600FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorligreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorligreen,LINETHICK2;
DRAWTEXT(顶背离,DEA*1.2,' ↖【顶背离】'),Color00FF00;
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>REF(DIFF,1) AND DEA>REF(DEA,1),colormagenta);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>REF(DIFF,1) AND DEA<REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=REF(DIFF,1) AND DEA>REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=REF(DIFF,1) AND DEA<REF(DEA,1),colorwhite);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>REF(DIFF,1) AND DEA>REF(DEA,1),colorred);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>REF(DIFF,1) AND DEA<REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=REF(DIFF,1) AND DEA>REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=REF(DIFF,1) AND DEA<REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),colorligray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),colorligreen);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF>0 AND DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),colorgray);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),colorlired);
FILLRGN(DIFF,DEA,DIFF<DEA AND DIFF<0 AND DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),colorlired);
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND Abs((DIFF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
二次翻红:(FH3 OR FH4 OR FH5),colorred,NODRAW;
低买:CROSS(DIFF,DEA) AND DIFF<0,COLORFF00FF,NODRAW;
DRAWICON(二次翻红,-0.05,1);
DRAWTEXT(二次翻红,-0.35,'↖【翻红】'),colorred;




来函数检测结果如下
该公式没有未来函数


解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

输出DIFF:收盘价的12日指数移动平均-收盘价的26日指数移动平均,线宽为1
输出DEA:DIFF的9日指数移动平均,COLORFFAA00,线宽为1
MACD赋值:2*(DIFF-DEA)
当满足条件MACD>=0时,在MACD和0位置之间画柱状线,宽度为4,1不为0则画空心柱.,画红色,线宽为3
当满足条件MACD<1日前的MACDANDMACD>0时,在0和MACD位置之间画柱状线,宽度为4,0不为0则画空心柱.,画黄色,线宽为3
当满足条件MACD<0时,在MACD和0位置之间画柱状线,宽度为4,1不为0则画空心柱.,画淡红色,线宽为3
当满足条件MACD<0ANDMACD<1日前的MACD时,在0和MACD位置之间画柱状线,宽度为2,0不为0则画空心柱.,画淡绿色,线宽为3
输出X1:如果DIFF<0,返回DIFF,否则返回0,COLOR0000FF,线宽为1
输出X2:如果DIFF<0,返回0,否则返回DIFF,画洋红色,线宽为1
输出X3:如果DIFF输出X4:如果DIFF>DEA,返回DEA,否则返回DEA,线宽为1,COLORFFBB11
低位金叉赋值:DIFF上穿DEA AND DIFF<-0.1
当满足条件低位金叉时,在DEA*0.86和DEA*0.66位置之间画柱状线,宽度为10,0不为0则画空心柱.,画洋红色
当满足条件低位金叉时,在DEA*0.96位置书写文字,画洋红色
GPW赋值:统计上次DEA>=0距今天数日中满足DIFF上穿DEA的天数
JCCOUNT赋值:统计上次DEA>=0距今天数日中满足DIFF上穿DEA的天数
二次金叉赋值:DIFF上穿DEA AND DEA<0 AND 统计21日中满足JCCOUNT=2的天数=1
当满足条件二次金叉时,在DEA*0.96和DEA*0.76位置之间画柱状线,宽度为10,0不为0则画空心柱.,画黄色
当满足条件二次金叉时,在DEA*1.1位置画'买入开仓'号图标
当满足条件二次金叉时,在DEA*1.30位置书写文字,画黄色
A1赋值:上次1日前的DIFF上穿DEA距今天数
底背离赋值:A1+1日前的收盘价>收盘价 AND DIFF>A1+1日前的DIFF AND DIFF上穿DEA
当满足条件底背离时,在DEA*1.09和DEA*0.86位置之间画柱状线,宽度为10,0不为0则画空心柱.,COLOR6600FF
当满足条件A1=0时,在DEA位置画直线起点,当满足条件底背离时,在DEA位置画直线终点,0表示是否延长.,画红色,线宽为2
当满足条件底背离时,在DEA*1.60位置书写文字,COLOR6600FF
A2赋值:上次1日前的DEA上穿DIFF距今天数
顶背离赋值:A2+1日前的收盘价<收盘价 AND A2+1日前的DIFF>DIFF AND DEA上穿DIFF
当满足条件A2=0时,在DEA位置画直线起点,当满足条件顶背离时,在A2日前的DEA位置画直线终点,0表示是否延长.,画淡绿色,线宽为2
当满足条件顶背离时,在DEA位置画直线起点,当满足条件顶背离时,在A2日前的DEA位置画直线终点,0表示是否延长.,画淡绿色,线宽为2
当满足条件顶背离时,在DEA*1.2位置书写文字,COLOR00FF00
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>1日前的DIFF AND DEA>1日前的DEA,画洋红色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF>1日前的DIFF AND DEA<1日前的DEA,画白色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=1日前的DIFF AND DEA>1日前的DEA,画白色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF>0 AND DIFF<=1日前的DIFF AND DEA<1日前的DEA,画白色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>1日前的DIFF AND DEA>1日前的DEA,画红色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF>1日前的DIFF AND DEA<1日前的DEA,画淡灰色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=1日前的DIFF AND DEA>1日前的DEA,画淡灰色)
FILLRGN(DIFF,DEA,DIFF>DEA AND DIFF<0 AND DIFF<=1日前的DIFF AND DEA<1日前的DEA,画淡灰色)
FILLRGN(DIFF,DEA,DIFF0 AND DIFF<1日前的DIFF AND DEA>1日前的DEA,画淡灰色)
FILLRGN(DIFF,DEA,DIFF0 AND DIFF<1日前的DIFF AND DEA<1日前的DEA,画淡绿色)
FILLRGN(DIFF,DEA,DIFF0 AND DIFF>=1日前的DIFF AND DEA>1日前的DEA,画淡红色)
FILLRGN(DIFF,DEA,DIFF0 AND DIFF>=1日前的DIFF AND DEA<1日前的DEA,画淡红色)
FILLRGN(DIFF,DEA,DIFF1日前的DEA,画淡红色)
FILLRGN(DIFF,DEA,DIFFFILLRGN(DIFF,DEA,DIFF=1日前的DIFF AND DEA>1日前的DEA,画淡红色)
FILLRGN(DIFF,DEA,DIFF=1日前的DIFF AND DEA<1日前的DEA,画淡红色)
FH1赋值:1日前的MACD<2日前的MACD AND 2日前的MACD<3日前的MACD AND 3日前的MACD<4日前的MACD
FH2赋值:MACD>=0 AND 统计1日中满足MACD>1日前的MACD的天数=1
FH3赋值:FH1 AND FH2 AND 收盘价的13日指数移动平均>1日前的收盘价的13日指数移动平均
FH4赋值:FH1 AND FH2 AND (DIFF-DEA)/收盘价的绝对值<0.018
FH5赋值:FH1 AND FH2 AND MACD<0.10
输出二次翻红:(FH3 OR FH4 OR FH5),画红色,NODRAW
输出低买:DIFF上穿DEA AND DIFF<0,COLORFF00FF,NODRAW
当满足条件二次翻红时,在-0.05位置画1号图标
当满足条件二次翻红时,在-0.35位置书写文字,画红色

指标安装下载帮助  |   联系我们  |  股朋指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股朋指标网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:股朋指标网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图