{macd波段}
drawgbk(close>0,colorrgb(1,1841,3411),colorrgb(1,1881,6532),3);
diff:ema(close,12)-ema(close,26),linethick0,color99ff;
dea:ema(diff,9),linethick0,colorff9999;
macd:2*(diff-dea),linethick0,colorcccc;
趋势:3*sma((close-llv(low,27))/(hhv(high,27)-llv(low,27))*100,5,1)-2*sma(sma((close-llv(low,27))/(hhv(high,27)-llv(low,27))*100,5,1),3,1),color800080;
kx:=sysparam(3)-sysparam(2)+1;
qsh:=hhv(趋势,kx);
qsl:=llv(趋势,kx);
hqmax:=qsh[datacount];
lqmin:=qsl[datacount];
qhlb:=(hqmax+lqmin)/2;
qhlc:=hqmax-lqmin;
mhf:=hhv(diff,kx);
mhd:=hhv(dea,kx);
mhm:=hhv(macd,kx);
mlf:=llv(diff,kx);
mld:=llv(dea,kx);
mlm:=llv(macd,kx);
hmax:=max(mhf[datacount],max(mhd[datacount],mhm[datacount]));
lmin:=min(mlf[datacount],min(mld[datacount],mlm[datacount]));
fhlb:=(hmax-lmin)/100;
fhlc:=hmax-lmin;
sh:=(-fhlb)*qhlc/fhlc+qhlb;
diffa:=(diff-fhlb)*qhlc/fhlc+qhlb;
deaa:=(dea-fhlb)*qhlc/fhlc+qhlb;
macda:=(macd-fhlb)*qhlc/fhlc+qhlb;
cda:=macd<ref(macd,1) and macd>0;
cdb:=macd>=ref(macd,1) and macd>0;
cdc:=macd>ref(macd,1) and macd<0;
cdd:=macd<=ref(macd,1) and macd<0;
stickline(cda,sh,macda,6,0),color11cc;
stickline(cda,sh,macda,6.6,0),coloraacc;
stickline(cda,sh,macda,4.4,0),colorbbcc;
stickline(cda,sh,macda,3.3,0),colorcccc;
stickline(cda,sh,macda,2.2,0),colorddcc;
stickline(cda,sh,macda,1.1,0),coloreecc;
stickline(cdb,sh,macda,6,0),coloraa;
stickline(cdb,sh,macda,6.6,0),color11bb;
stickline(cdb,sh,macda,4.4,0),color22cc;
stickline(cdb,sh,macda,3.3,0),color33dd;
stickline(cdb,sh,macda,2.2,0),color44ee;
stickline(cdb,sh,macda,1.1,0),color55ff;
stickline(cdc,sh,macda,6,0),coloraa00bb;
stickline(cdc,sh,macda,6.6,0),colorbb11bb;
stickline(cdc,sh,macda,4.4,0),colorcc22bb;
stickline(cdc,sh,macda,3.3,0),colordd33bb;
stickline(cdc,sh,macda,2.2,0),coloree44bb;
stickline(cdc,sh,macda,1.1,0),colorff55bb;
stickline(cdd,sh,macda,6,0),colorff7700;
stickline(cdd,sh,macda,6.6,0),colorff8811;
stickline(cdd,sh,macda,4.4,0),colorffaa22;
stickline(cdd,sh,macda,3.3,0),colorffbb33;
stickline(cdd,sh,macda,2.2,0),colorffdd44;
stickline(cdd,sh,macda,1.1,0),colorffdd55;
partline(diff>0 or diff<0,diffa),color99ff;
partline(dea>0 or dea<0,deaa),colorff9999;
partline(趋势,趋势),linethick2,coloraa00bb;
drawtext(islastbar,sh,'0'),coloraaaa;
底部:if(cross(趋势,3),0,10),coloraaaaaa;
高抛:if(趋势>=85,75,85),colorbb00;
顶部:if(趋势>90,90,100),coloraacc99;
买入:=cross(趋势,0) or cross(趋势,3) or cross(diffa,趋势) and 趋势<18 and cdc or cross(趋势,diffa) and cross(趋势,deaa) and cross(趋势,macda) and barslast(cross(deaa,趋势))<5;
drawtext(filter(买入,2),5,'买'),color99ff;
drawtext(filter(趋势>90,2),100,'卖'),colorcc00;
追涨:=cross(趋势,10) and cross(diff,dea);
drawicon(追涨,10,8);
xg:=cross(趋势,macda) and 趋势>ref(趋势,1) and 趋势<15;
xg1:=cross(macda,deaa) and cross(10,趋势);
xg2:=cdc and 趋势<10 and 趋势>ref(趋势,1) and diff>ref(diff,1) and macd>ref(macd,1);
xg3:=cross(macd,0) and cross(diff,dea) and 趋势>ref(趋势,1) and 趋势<diffa and dea>ref(dea,1) and ref(close<=open,1);
xg4:=cross(趋势,diffa) and diff>0 and cdc and barslast(cross(diffa,趋势))<2;
选股:if(买入 or 追涨 or xg or xg1 or xg2 or xg3 or xg4,20,0),linethick0;
drawicon(xg or xg1 or xg2 or xg3 or xg4,10,10);
drawicon(cross(diffa,趋势) and 买入=0 and diffa>85,100,9);
上一指标公式:决战2009的敢死队公式 飞狐敢死队指标 源码
下一指标公式:副图精品公式 飞狐指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文MACD波段公式 飞狐波段指标 源码仅供学习研究。