我在用的东北证券大智慧软件的macd副图公式
diff:ema(close,12)-ema(close,27);
dea:ema(diff,9);
macd:=2*(diff-dea);
{主升浪}
主升 : diff>0 and diff>dea,color0000ff,pointdot,linethick0;
fillrgn(diff,dea,主升,rgb(250,0,0));
drawtextabs(10,5,'板块名称:'+bkname),colorwhite;
{背景k线}
drawgbk(diff>dea,strip(rgb(50,0,0),rgb(50,0,0),0));
drawgbk(diff>0 and diff>dea,strip(rgb(150,30,80),rgb(150,0,0),0));
{背景k线}
drawgbk(last("macd.macd"<ref("macd.macd",1)) and macd>0,strip(rgb(0,0,200),rgb(0,140,0),0));
{macd分色观察}
stickline(macd>=0,macd,0,4,1),colorf00ff0;
stickline(macd<0,macd,0,4,1),colorwhite;
stickline(macd<ref(macd,1)and macd>0,0,macd,4,0 ),color00aaff;
stickline(macd<ref(macd,1)and macd>0,0,macd,3.3,0 ),color00bbff;
stickline(macd<ref(macd,1)and macd>0,0,macd,2.2,0 ),color00ccff;
stickline(macd<ref(macd,1)and macd>0,0,macd,1.65,0 ),color00ddff;
stickline(macd<ref(macd,1)and macd>0,0,macd,1.1,0 ),color00eeff;
stickline(macd<ref(macd,1)and macd>0,0,macd,0.55,0 ),color00ffff;
stickline(macd>=ref(macd,1)and macd>0,0,macd,4 ,0 ),color0000aa;
stickline(macd>=ref(macd,1)and macd>0,0,macd,3.3 ,0 ),color0011bb;
stickline(macd>=ref(macd,1)and macd>0,0,macd,2.2,0 ),color0022cc;
stickline(macd>=ref(macd,1)and macd>0,0,macd,1.65 ,0 ),color0033dd;
stickline(macd>=ref(macd,1)and macd>0,0,macd,1.1 ,0 ),color0044ee;
stickline(macd>=ref(macd,1)and macd>0,0,macd,0.55 ,0 ),color0055ff;
stickline(macd>ref(macd,1)and macd<0,0,macd,4,0 ),coloraa00bb;
stickline(macd>ref(macd,1)and macd<0,0,macd,3.3 ,0 ),colorbb11bb;
stickline(macd>ref(macd,1)and macd<0,0,macd,2.2,0 ),colorcc22bb;
stickline(macd>ref(macd,1)and macd<0,0,macd,1.65,0 ),colordd33bb;
stickline(macd>ref(macd,1)and macd<0,0,macd,1.1,0 ),coloree44bb;
stickline(macd>ref(macd,1)and macd<0,0,macd,0.55 ,0 ),colorff55bb;
stickline(macd<=ref(macd,1)and macd<0,0,macd,4,0 ),colorffaa00;
stickline(macd<=ref(macd,1)and macd<0,0,macd,3.3 ,0 ),colorffbb11;
stickline(macd<=ref(macd,1)and macd<0,0,macd,2.2,0 ),colorffcc22;
stickline(macd<=ref(macd,1)and macd<0,0,macd,1.65 ,0 ),colorffdd33;
stickline(macd<=ref(macd,1)and macd<0,0,macd,1.1 ,0 ),colorffee44;
stickline(macd<=ref(macd,1)and macd<0,0,macd,0.55 ,0 ),colorffff55;
if(diff<0,diff,0),colorred,linethick1;
if(diff<0,0,diff),coloryellow,linethick1;
if(diff<dea,diff,dea),color00ff00,linethick1;
if(diff>dea,dea,dea),colorwhite,linethick1;
低位金叉:cross(diff,dea) and diff<-0.1;
stickline(低位金叉,0,-0.18,6,0),coloryellow;
drawtext(低位金叉,-0.1,' 低位金叉'),coloryellow;
jccount:=count(cross(diff,dea),barslast(dea>=0));
二次金叉:=cross(diff,dea) and dea<0 and count(jccount=2,21)=1;
stickline(二次金叉,0,-0.18,6,0),colorff00ff;
drawicon(二次金叉,dea*1.04,13) ;
drawtext(二次金叉,-0.1,' 二次金叉'),color00ff00;
a1:=barslast(ref(cross(diff,dea),1));
底背离:=ref(close,a1+1)>close and diff>ref(diff,a1+1) and cross(diff,dea);
stickline(底背离,0,0.13,6,0),color00ff00;
drawline(a1=0,dea,底背离,dea,0),colorred,linethick2;
drawtext(底背离,0.1,' 底背离'),color00ff00;
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,顶背离,dea,0),colorgreen,linethick2;
{macd选股买入信号}
{macd红柱连续变小后再变长的第一根上涨红柱}
一级买点:"macd.macd">ref("macd.macd",1) and ref(last("macd.macd"<ref("macd.macd",1) and "macd.macd">0),1)>=3 ;
stickline(一级买点,0,-0.18,6,0),coloryellow;
drawtext(一级买点,-0.1,' 一级买点'),colorff00ff;
{macd红柱绿柱,一旦缩短将趋势转向,如缩后再变长,则原趋势更强 ,
条件是前期有一波波段强势上涨,其中30天内有涨停,30天内资金流入大于流出,
回调后,出现买点介入};
{macd变绿后再变红的第一根红柱}
二级买点:cross("macd.macd",0) and ref(count("macd.macd"<0,4)<=3,1);
stickline(二级买点,0,-0.18,6,0),colorff00ff;
drawtext(二级买点,-0.1,' 二级买点'),coloryellow;
{macd变绿后4天内重新再变红出现的第一根红柱是重拾强势之股,
条件是前期有一波波段强势上涨,其中30天内有涨停,30天内资金流入大于流出,
回调后,出现买点介入};
{解盘4}
均价:=(3*c+h+l+o)/6;
var1:=(8*均价+7*ref(均价,1)+6*ref(均价,2)+5*ref(均价,3)+
4*ref(均价,4)+3*ref(均价,5)+2*ref(均价,6)+ref(均价,8))/36;
var2:=(llv(var1,2)+llv(var1,4)+llv(var1,6))/3;
sz1:=ref(var1,1)=ref(var2,1) and var1>var2 and close>var1;
sz2:=var1>var2 and var1>ref(var1,1) and var2>ref(var2,1)
and h/var1<1.1 and l>var2 and close>var1;
sz3:=var1>var2 and var1>ref(var1,1) and var2>=ref(var2,1) and h/var1>1.1;
sz4:=var1>var2 and var1>ref(var1,1) and var2>ref(var2,1)
and close>var2 and close<var1;
sz5:=(var1>var2 and var2>ref(var2,1) and var1<>ref(var1,1)
and close<var2) or (var1>var2 and var1<ref(var1,1)
and var2<ref(var2,1) and close<var2);;
sz6:=ref(var1,1)>ref(var2,1) and var1=var2 and close<var2;
xd1:=var1=var2 and close<var2 or (var1<ref(var1,1) and var2<ref(var2,1)
and ref(var1,1)=ref(var2,1) and close<var2);
xd2:=var1=var2 and close>var1;
if barstatus=2 and sz1 then begin
drawtextabs(800,30,'调整结束短线介入'),linethick7,colorred;
end
else
if barstatus=2 and sz2 then begin
drawtextabs(800,30,'上升通道走势良好'),linethick7,colorred;
end
else
if barstatus=2 and sz3 then begin
drawtextabs(800,30,'股价偏离注意调整'),linethick7,colorred;
end
else
if barstatus=2 and sz4 then begin
drawtextabs(800,30,'上升通道调整洗盘'),linethick7,colorgreen;
end
else
if barstatus=2 and sz5 then begin
drawtextabs(800,30,'转向特征注意离场'),linethick7,colorgreen;
end
else
if barstatus=2 and sz6 then begin
drawtextabs(800,30,'通道改变坚决离场'),linethick7,colorgreen;
end
else
if barstatus=2 and xd1 then begin
drawtextabs(800,30,'下跌通道只宜观望'),linethick7,colorgreen;
end
else
if barstatus=2 and xd2 then begin
drawtextabs(800,30,'短期底部准备进入'),linethick7,coloryellow;
上一指标公式:选股只需4个P续板块擒龙诀公式下载 大智慧板块
下一指标公式:变色成交量副图公式(蓝色为做空带)下载 大智慧做空变色
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文我在用的东北证券大智慧软件的MACD副图公式下载 大智慧分享新春仅供学习研究。