{macd红绿柱面积(飞狐副图)}
diff1:=ema(close,s) - ema(close,p);
dea1:=ema(diff1,m);
macd:2*(diff1-dea1){,colorstick},linethick0;
macdhs:=if(macd>0 and macd>=ref(macd,1),macd,0);
macdhx:=if(macd>0 and macd<=ref(macd,1),macd,0);
macdlx:=if(macd<0 and macd<ref(macd,1),macd,0);
macdls:=if(macd<0 and macd>ref(macd,1),macd,0);
stickline(macdhs>0,0,macd,9,0),color0000bb;
stickline(macdhs>0,0,macd,8,0),color0000cc;
stickline(macdhs>0,0,macd,7,0),color0011cc;
stickline(macdhs>0,0,macd,6,0),color1122dd;
stickline(macdhs>0,0,macd,5,0),color2233dd;
stickline(macdhs>0,0,macd,4,0),color3344ee;
stickline(macdhs>0,0,macd,3,0),color4455ee;
stickline(macdhs>0,0,macd,2,0),color5566ff;
stickline(macdhs>0,0,macd,1,0),color6677ff;
stickline(macdhx>0,0,macd,9,0),color0077bb;
stickline(macdhx>0,0,macd,8,0),color0088cc;
stickline(macdhx>0,0,macd,7,0),color0099cc;
stickline(macdhx>0,0,macd,6,0),color00aadd;
stickline(macdhx>0,0,macd,5,0),color00bbdd;
stickline(macdhx>0,0,macd,4,0),color00ccee;
stickline(macdhx>0,0,macd,3,0),color00ddee;
stickline(macdhx>0,0,macd,2,0),color00eeff;
stickline(macdhx>0,0,macd,1,0),color00ffff;
stickline(macdlx<0,macd,0,9,0),color770000;
stickline(macdlx<0,macd,0,8,0),color881100;
stickline(macdlx<0,macd,0,7,0),color992200;
stickline(macdlx<0,macd,0,6,0),coloraa3300;
stickline(macdlx<0,macd,0,5,0),colorbb4400;
stickline(macdlx<0,macd,0,4,0),colorcc5500;
stickline(macdlx<0,macd,0,3,0),colordd6600;
stickline(macdlx<0,macd,0,2,0),coloree7700;
stickline(macdlx<0,macd,0,1,0),colorff8800;
stickline(macdls<0,macd,0,9,0),color005500;
stickline(macdls<0,macd,0,8,0),color007700;
stickline(macdls<0,macd,0,7,0),color009900;
stickline(macdls<0,macd,0,6,0),color00aa00;
stickline(macdls<0,macd,0,5,0),color00bb00;
stickline(macdls<0,macd,0,4,0),color00cc00;
stickline(macdls<0,macd,0,3,0),color00dd00;
stickline(macdls<0,macd,0,2,0),color00ee00;
stickline(macdls<0,macd,0,1,0),color00ff00;
diff:diff1,color0000ff;
dea:dea1,colorff0000;
红柱面积:if(macd>0,sum(macd,barslast(macd<0)),0),linethick0,color0000ff;
绿柱面积:if(macd<0,sum(macd,barslast(macd>0)),0),linethick0,color006000;
{平均面积: if(macd>0,10*红柱面积/barslast(macd<0),10*绿柱面积/barslast(macd>0)),linethick0,colorff00ff;}
drawnumber(ref(macd,1)>0 and macd<=0 ,hhv(macd,4),ref(红柱面积,1),2),align1,pxup10,colorred;
{drawnumber(ref(macd,1)>0 and macd<=0 ,hhv(macd,4),ref(平均面积,1),2),align1,pxup35,colorff00ff;}
drawnumber(ref(macd,1)<0 and macd>=0 ,llv(macd,4),ref(abs(绿柱面积),1),2),align1,pxdn5,color006000;
{drawnumber(ref(macd,1)<0 and macd>=0 ,llv(macd,4),ref(abs(平均面积),1),2),align1,pxdn30,colorff00ff;}
drawnumber(barstatus=2 and macd<0,llv(macd,4),abs(绿柱面积),2),align2,pxdn5,color006000;
{drawnumber(barstatus=2 and macd<0,llv(macd,4),abs(平均面积),2),align2,pxdn30,colorff00ff;}
drawnumber(barstatus=2 and macd>0,hhv(macd,4),abs(红柱面积),2),align2,pxup10,colorred;
{drawnumber(barstatus=2 and macd>0,hhv(macd,4),abs(平均面积),2),align2,pxup35,colorff00ff;}
drawnumber(macd>0 and macd=hhv(macd,barslast(macd<0)) and macd>=refx(macd,1) and macd>=refx(macd,2),macd,macd,2),align0,pxup20,colorff0000;
drawnumber(macd<0 and macd=llv(macd,barslast(macd>0)) and macd<=refx(macd,1) and macd<=refx(macd,2),macd,macd,2),align0,pxup10,colorff00ff;
0,color000000;
上一指标公式:买卖逃顶副图指标公式详解 飞狐买卖指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文MACD红绿柱面积副图指标公式详解 飞狐红绿柱面指标 源码仅供学习研究。