顶底背离,多空趋势.
{macd顶底背离组合}
drawgbk(close>0, colorrgb(1,0,0), colorrgb(1,0,0),2);
diff:ema(close,12) - ema(close,26),linethick;
dea:ema(diff,9),color39fd96,linethick1;
fillrgn(diff>dea,diff,dea),color39fd96;
macd:=2*(diff-dea), colorstick,linethick1;
s:=macd;
s1:=s<ref(s,1) and s>0;
s2:=s<ref(s,1) and s<0;
stickline(s>=0,0,s,2,1),colorred,linethick1;
stickline(s1,0,s,2,1),color677937,linethick1;
stickline(s2,0,s,2,1),color964e27,linethick1;
hd := high-ref(high,1);
ld := ref(low,1)-low;
pdm:= sum(if(hd>0 and hd>ld,hd,0),14);
mdm:= sum(if(ld>0 and ld>hd,ld,0),14);
pdi:= pdm*100/tr;
mdi:= mdm*100/tr;
a1:=barslast(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));
b1:=ref(c,a1+1)>c and ref("macd.diff"(12,26,9),a1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));
a2:=barslast(ref(cross("kdj.k"(9,3,3),"kdj.d"(9,3,3)),1));
b2:=ref(c,a2+1)>c and ref("kdj.k"(9,3,3),a2+1)<"kdj.k"(9,3,3) and cross("kdj.k"(9,3,3),"kdj.d"(9,3,3));
a3:=barslast(ref(cross("rsi.rsi1"(6,12,24),"rsi.rsi2"(6,12,24)),1));
b3:=ref(c,a3+1)>c and ref("rsi.rsi1"(6,12,24),a3+1)<"rsi.rsi1"(6,12,24) and cross("rsi.rsi1"(6,12,24),"rsi.rsi2"(6,12,24));
c1:=barslast(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
d1:=ref(c,c1+1)<c and ref("macd.diff"(12,26,9),c1+1)>"macd.diff"(12,26,9) and cross("macd.dea"(12,26,9),"macd.diff"(12,26,9));
c2:=barslast(ref(cross("kdj.d"(9,3,3),"kdj.k"(9,3,3)),1));
d2:=ref(c,c2+1)<c and ref("kdj.k"(9,3,3),c2+1)>"kdj.k"(9,3,3) and cross("kdj.d"(9,3,3),"kdj.k"(9,3,3));
c3:=barslast(ref(cross("rsi.rsi2"(6,12,24),"rsi.rsi1"(6,12,24)),1));
d3:=ref(c,c3+1)<c and ref("rsi.rsi1"(6,12,24),c3+1)>"rsi.rsi1"(6,12,24) and cross("rsi.rsi2"(6,12,24),"rsi.rsi1"(6,12,24));
c4:=barslast(ref(cross(mdi,pdi),1));
d4:=ref(c,c4+1)<c and ref(mdi,c4+1)>mdi and cross(mdi,pdi);
a4:=barslast(ref(cross(pdi,mdi),1));
b4:=ref(c,a4+1)>c and ref(pdi,a4+1)<pdi and cross(pdi,mdi);
dmi底背:if(b4>0,-0.1,0),color0099ff,pointdot;
dmi顶背:if(d4>0,0.1,0),colorblue,pointdot;
macd底背:if(b1>0,-0.1,0),colorred,pointdot;
kdj底背:if(b2>0,-0.1,0),colorff00ff,pointdot;
rsi底背:if(b3>0,-0.1,0),coloryellow,pointdot;
macd顶背:if(d1>0,0.1,0),color00ff00,pointdot;
kdj顶背:if(d2>0,0.1,0),colorffcc66,pointdot;
rsi顶背:if(d3>0,0.1,0),colorwhite,pointdot;
stickline(b1>0,-0.1,0,4,0),colorred;
stickline(b2>0,-0.1,0,4,0),colorff00ff;
stickline(b3>0,-0.1,0,4,0),coloryellow;
stickline(d1>0,0.1,0,4,0),color00ff00;
stickline(d2>0,0.1,0,4,0),colorffcc66;
stickline(d3>0,0.1,0,4,0),colorwhite;
stickline(b4>0,-0.1,0,4,0),color0099ff;
stickline(d4>0,0.1,0,4,0),colorblue;
vva:=((amount)/(vol))/(100);
vvb:=((3)*(high)+low+open+(2)*(close))/(7);
vvc:=((sum(amount,7))/(vva))/(100);
vvd:=dma(vvb,(vol)/(vvc));
vve:=((close-vvd)/(vvd))*(100);
vvf:=((close-llv(low,34))/(hhv(high,34)-llv(low,34)))*(100);
vvj:=ma(vve,20)+std(vve,20);
bias18:=((close-ma(close,18))/(ma(close,18)))*(100);
kv:=sma(vvf,3,1);
stickline((ref(bias18,1)>=5) and cross(vvj,vve) and (kv>79),macd,macd+0.03,4,0),color00ff00;
lc:=ref(close,1);
rsi:=sma(max(close-lc,0),6,1)/sma(abs(close-lc),6,1)*100;
stickline(cross(84,rsi),macd,macd+0.03,4,0),color00ff00;
多方趋势:=7*sma((close-llv(low,27))/(hhv(high,27)-llv(low,27))*30,4,1)
-3*sma(sma((close-llv(low,27))/(hhv(high,27)-llv(low,27))*30,4,1),3,1)
-sma(sma(sma((close-llv(low,27))/(hhv(high,27)-llv(low,27))*30,4,1)
,3,1),2,1);
天线:=78.89;
stickline(cross(天线,多方趋势),macd,macd+0.03,4,0),color00ff00;
a1:=ema(close,8)-ema(close,14);
b1:=ema(0.668*ref(a1,1)+0.333*a1,1);
做多:if(a1>=b1,a1,b1),colorff00ff,linethick1;
做空:=if(b1-a1,b1,a1),linethick;
fillrgn(做多>做空,做多,做空),colorff00ff;
上一指标公式:神奇布林线-成功率90%最新修改绝对能用公式 飞狐能用成功率指标 源码
下一指标公式:2短线三浪公式 飞狐指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文周末发组合公式 飞狐公式源码指标 源码仅供学习研究。