指标公式详细说明
好公式网(www.goodgongshi.com)告诉您:当前正要下载:macd力道公式 飞狐力道指标 源码
macd力道
macd金叉之后 配有上穿多条均线,是强势的表现。
可跟进
macd死叉之后 配有下穿多条均线,是弱势的表现。
可退场
input : m(9),long(26),short(12);
diff : ema(close,short) - ema(close,long);
dea: ema(diff,m);
macd : 2*(diff-dea), colorstick;
macd2:=macd;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,2,0 ),color00aaff;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,1.8,0 ),color00bbff;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,1.3,0 ),color00ccff;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,1.2,0 ),color00ddff;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,1,0 ),color00eeff;
stickline(macd2<=ref(macd2,1)and macd2>0,0,macd2,0.5,0 ),color00ffff;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,5,0 ),color0000aa;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,4 ,0 ),color0011bb;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,3,0 ),color0022cc;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,2,0 ),color0033dd;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,1,0 ),color0044ee;
stickline(macd2>ref(macd2,1)and macd2>0,0,macd2,0.5 ,0 ),color0055ff;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,5,0 ),coloraa00bb;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,4 ,0 ),colorbb11bb;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,3,0 ),colorcc22bb;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,2,0 ),colordd33bb;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,1 ,0 ),coloree44bb;
stickline(macd2>ref(macd2,1)and macd2<=0,0,macd2,0.5,0 ),colorff55bb;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,2,0 ),colorff7700;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,1.5 ,0 ),colorff8811;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,1.2,0 ),colorffaa22;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,1.0 ,0 ),colorffbb33;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,0.8 ,0 ),colorffdd44;
stickline(macd2<=ref(macd2,1)and macd2<=0,0,macd2,0.5 ,0 ),colorffff55;
二线:c>ref(c,1) and cross(c,ma(c,5)) and cross(c,ma (c,10)) or cross(c,ma(c,20)) and cross(c,ma (c,10)),colorgreen;
三线:c>ref(c,1) and cross(c,ma(c,5)) and cross(c,ma (c,10)) and cross(c,ma(c,20)),colorgreen;
四线:c>ref(c,1) and cross(c,ma(c,5)) and cross(c,ma (c,10)) and cross(c,ma(c,20)) and cross(c,ma(c,30)),coloryellow;
五线:c>ref(c,1) and cross(c,ma(c,5)) and cross(c,ma (c,10)) and cross(c,ma(c,20)) and cross(c,ma(c,30)) and cross(c,ma(c,40)),colorred;
六线:c>o and cross(c,ma(c,5)) and cross(c,ma(c,10)) and cross(c,ma(c,20)) and cross(c,ma(c,30))and cross(c,ma(c,40)) and cross(c,ma(c,60)) and slope(ma(c,60),2)>0,colorffff00;
a:=if(cross(c,ma(c,5)),1,0);
b:=if(cross(c,ma(c,10)),1,0);
c1:=if(cross(c,ma(c,20)),1,0);
d:=if(cross(c,ma(c,30)),1,0);
e:=if(cross(c,ma(c,40)),1,0);
f:=if(cross(c,ma(c,50)),1,0);
g:=if(cross(c,ma(c,60)),1,0);
h1:=if(cross(c,ma(c,90)),1,0);
i:=if(cross(c,ma(c,100)),1,0);
l1:=if(cross(c,ma(c,120)),1,0);
o1:=if(cross(c,ma(c,150)),1,0);
p:=if(cross(c,ma(c,180)),1,0);
q:=if(cross(c,ma(c,200)),1,0);
r:=if(cross(c,ma(c,250)),1,0);
s:=if(cross(c,ma(c,70)),1,0);
t:=if(cross(c,ma(c,80)),1,0);
s:a+b+c1+d+e+f+g+h1+i+l1+o1+p+q+r+s+t,linethick0;
stickline(s<>0,diff,dea,3,0),colorff;
a1:=s;
b1:=('上穿过:' + numtostr(a1[sysparam(1)],2));{定义出b1价格=光标位置的a2值保留小数点后两位}
drawtext((barpos = sysparam(1)) ,macd*1.01,b1),colorffff,shift2;{在a1处写出b1价格} ;
explainex(barpos = sysparam(1) ,'上穿过:',a1,2,0),color5290ff;
drawicon(s,macd,10);
a2:=if(cross(ma(c,5),c),1,0);
b2:=if(cross(ma(c,10),c),1,0);
c2:=if(cross(ma(c,20),c),1,0);
d2:=if(cross(ma(c,30),c),1,0);
e2:=if(cross(ma(c,40),c),1,0);
f2:=if(cross(ma(c,50),c),1,0);
g2:=if(cross(ma(c,60),c),1,0);
h2:=if(cross(ma(c,90),c),1,0);
i2:=if(cross(ma(c,100),c),1,0);
l2:=if(cross(ma(c,120),c),1,0);
t2:=if(cross(c,ma(c,150)),1,0);
o2:=if(cross(ma(c,180),c),1,0);
p2:=if(cross(ma(c,200),c),1,0);
q2:=if(cross(ma(c,250),c),1,0);
r2:=if(cross(ma(c,70),c),1,0);
s2:=if(cross(ma(c,80),c),1,0);
s1:a2+b2+c2+d2+e2+f2+g2+h2+i2+l2+p2+q2+r2+s2+t2,linethick0;
stickline(s1<>0,diff,dea,3,0),colorff00;
a1:=s1;
b1:=('下穿过:' + numtostr(a1[sysparam(1)],2));{定义出b1价格=光标位置的a2值保留小数点后两位}
explainex(barpos = sysparam(1) ,'下穿过:',a1,2,0),color5290ff;
drawtext((barpos = sysparam(1)) ,0-macd*1.5,b1),colorffff00,shift2;{在a1处写出b1价格}
drawicon(s1,0,11);
>>>使用本站搜索工具可以找到更多“macd力道公式 飞狐力道指标 源码”