愚人macd分析,有指标用法说明源码下载:
macd能量分析指标
本指标通过macd的面积测量及多空双方量能显示,准确地反映当前股价的强弱状态,
为买卖决策提供帮助。
diff:ema(close,short) - ema(close,long);
dea:ema(diff,m);
macd:2*(diff-dea),colorstick;
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);
红柱面积:=if(macd>0,sum(macd,barslast(macd<0)),0),precis2,color0000ff;
绿柱面积:=if(macd<0,sum(macd,barslast(macd>0)),0),precis2,color006000;
//macd面积:if(macd<0,abs(绿柱面积),abs(红柱面积)),nodraw;
drawtext(ref(macd,1)>0 and macd<=0 ,hhv(macd,4),tostring(ref(红柱面积,1),2)),colorred;
drawtext(ref(macd,1)<0 and macd>=0 ,llv(macd,4),tostring(ref(abs(绿柱面积),1),2)),color00ff00;
drawtext(isnull(refx(&close,1))=1 and macd<0,llv(macd,4),tostring(abs(绿柱面积),2)),color004a00;
drawtext(isnull(refx(&close,1))=1 and macd>0,hhv(macd,4),tostring(abs(红柱面积),2)),colorred;
diff : ema(close,short) - ema(close,long);
dea : ema(diff,m);
macd : 2*(diff-dea);
gj:=max(c,o);
stickline(macd>0 and macd>=ref(macd,1),0,macd,2,0),color0000ff;
stickline(macd>0 and macd<ref(macd,1),0,macd,2,0),colorffff00;
stickline(macd<0 and macd>=ref(macd,1),0,macd,2,0),colorff00ff;
stickline(macd<0 and macd<ref(macd,1),0,macd,2,0),color00ff00;
l4:=llv(gj,4);
jl:=(hhv(diff,55)-llv(diff,55))/5;
gt:=dea>ref(dea,1) and ref(dea,1)<ref(dea,2);
a1:=barslast(ref(gt,1));
底背离:=ref(l4,a1+1)>close and diff>ref(diff,a1+1) and gt;
drawline(a1=0,dea,底背离,ref(dea,a1),0),colorred,linethick2;
drawline(底背离,dea,底背离,ref(dea,a1),0),colorred,linethick2;
drawtext(底背离,ref(dea,a1)*1.18,' 底背离'),colorff00ff;
h4:=hhv(gj,4);
gt2:=dea<ref(dea,1) and ref(dea,1)>ref(dea,2);
a2:=barslast(ref(gt2,1));
顶背离:= ref(h4,a2+1)<h4 and diff<ref(diff,a2+1) and gt2;
drawline(a2=0 ,dea,顶背离,ref(dea,a2),0),colorgreen,linethick2;
drawline(顶背离,dea,顶背离,ref(dea,a2),0),colorgreen,linethick2;
drawtext(顶背离,ref(dea,a2)*1.18,' 顶背离'),colorgreen;
tt:=(2*close+open+high+low);
主导动能:tt/ema(tt,4)-1,colorstick;
ff:=主导动能;
stickline(ff>0,0,ff,3,0),color33cfdd;
stickline(ff>0 and ff>ref(ff,1),0,ff,3,0),color0000cc;
stickline(ff<=0,0,ff,3,0),color00cc00;
stickline(ff<=0 and ff>ref(ff,1),0,ff,3,0),colorff9900;
做多主导:iff(ff>0 and ff>ref(ff,1),ff,0),nodraw,color0000cc;
获利回吐:iff(ff>0 and ff<=ref(ff,1),ff,0),nodraw,color33cfdd;
做空主导:iff(ff<=0 and ff<=ref(ff,1),ff,0),nodraw,color00cc00;
空头回补:iff(ff<=0 and ff>ref(ff,1),ff,0),nodraw,colorff9900;
diff :=ema(close,12) - ema(close,26),colorwhite;
dea :=ema(diff,9),coloryellow;
macd:=2*(diff-dea);
zero :0;
gj:=max(c,o);
stickline(macd>0 and macd>=ref(macd,1),0,macd,5,0),color0000ff;
stickline(macd>0 and macd<ref(macd,1),0,macd,5,0),colorffff00;
stickline(macd<0 and macd>=ref(macd,1),0,macd,5,0),colorff00ff;
stickline(macd<0 and macd<ref(macd,1),0,macd,5,0),color00ff00;
diff:=ema(c,12)-ema(c,26);
dea:=ema(diff,9);
第一红柱:cross(diff,dea),colorred,linethick2;
var1:=sma(amount/10,10,1)/10000;
var2:=ref(var1,1);
var1=hhv(var1,20);
多转空:=((((llv(macd,4)>0) and (macd<ref(macd,1))) and (ref(macd,1)>ref(macd,2))) and (ref(macd,2)>ref(macd,3)));
空转多:=((((hhv(macd,4)<0) and (macd>ref(macd,1))) and (ref(macd,1)<ref(macd,2))) and (ref(macd,2)<ref(macd,3)));
drawicon(多转空,macd,2);
drawicon(空转多,macd,1);
n1:=12;
n2:=26;
n3:=9;
diff:=(ema(close,n1) - ema(close,n2));
dea:=ema(diff,n3);
macd2:=(2 * (diff - dea));
du0:=cross(diff,0);
ud0:=cross(0,diff);
tdu0:=barslast(du0);
tud0:=barslast(ud0);
du3:=ref(du0,1);
ud3:=ref(ud0,1);
tdu3:=barslast(du3);
tud3:=barslast(ud3);
udgline:=if((tdu3 < tud3),ref(hhv(high,2),tdu3),ref(llv(low,2),tud3));
jdu0:=(((ref(close,1) <= ref(udgline,1)) and (close > udgline)) and (tdu0 < tud0));
jud0:=(((ref(close,1) >= ref(udgline,1)) and (close < udgline)) and (tud0 < tdu0));
jdu1:=(jdu0 and (count(jdu0,tdu0) = 1));
jud1:=(jud0 and (count(jud0,tud0) = 1));
jdu2:=(jdu1 and (ref(barslast(jud1),1) < ref(barslast(jdu1),1)));
jud2:=(jud1 and (ref(barslast(jud1),1) > ref(barslast(jdu1),1)));
jdu3:=(jdu1 and (ref(barslast(jud1),1) > ref(barslast(jdu1),1)));
jud3:=(jud1 and (ref(barslast(jud1),1) < ref(barslast(jdu1),1)));
bsline:=if((barslast(jdu2) < barslast(jud2)),if(ref(cross(0,macd2),1),llv(low,2),ref(llv(low,2),barslast(ref(cross(0,macd2),1)))),if(ref(cross(macd2,0),1),hhv(high,2),ref(hhv(high,2),barslast(ref(cross(macd2,0),1)))));
stickline((macd2>=0),0,macd2,2,0),colorff00ff;
stickline(((macd2>=0) and (macd2 < ref(macd2,1))),0,macd2,2,1),colorgreen;
stickline((macd2<0),0,macd2,2,0),colorffff00;
stickline(((macd2<0) and (macd2 > ref(macd2,1))),0,macd2,2,0),coloryellow;
defut:=barslast(cross(macd2,0));
defdt:=barslast(cross(0,macd2));
deful:=if((macd2 >= 0),hhv(macd2,(defut + 1)),ref(hhv(macd2,(defut + 1)),(defdt + 1)));
defdl:=if((macd2 < 0),llv(macd2,(defdt + 1)),ref(llv(macd2,(defdt + 1)),(defut + 1)));
defu2l:=ref(deful,(defut + 1));
defd2l:=ref(defdl,(defdt + 1));
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.5,4,0),colorwhite;
dif2:ema(sum(macd2,2),3),linethick2,coloryellow;
入1:if(dif2>ref(dif2,1),dif2,drawnull),colorred,linethick2;
入2:if(dif2<ref(dif2,1),dif2,drawnull),colorgreen,linethick2;
dea2:ma(dif2,5),colorcyan;
dif3:=ema(close,12)-ema(close,26);
dea3:=ema(dif3,9);
macd3 := 2*(dif3-dea3);
rsv:=(close-llv(low,9))/(hhv(high,9)-llv(low,9))*100;
k:=sma(rsv,3,1);
d:=sma(k,3,1);
j:=3*k-2*d;
止跌:macd3>ref(macd3,1) and ref(macd3,2)>=ref(macd3,1) and j<50 and c>ref(c,1) and c>o and j>ref(j,1);
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文愚人MACD分析,有指标用法说明下载仅供学习研究。