//OBVDAYS:统计股价在通线上期限,默认20; // OBVRATIO 统计期限内,股价在通线上的比例,默认0.75
// SHORT:3-11,9
// LONG: 5-26,17
// DAYS:5-100,50;
//PASTDAYS: 1-15,5
DIFF:EMA(C,SHORT)-EMA(C,LONG),colorwhite;
DEA:EMA(DIFF,8),COLOrffaa00;
ZERO:0,colorred;
MACD:=2*(DIFF-DEA);
//www.fxjgsw.com
DIFF上穿0轴:=CROSS(DIFF,0),nodraw;
STICKLINE(MACD>=0,MACD,0,2,1),COLOR0000FF;
STICKLINE(MACD<0,MACD,0,2,1),colorgreen;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR00aaff;
STICKLINE(DIFF上穿0轴,MACD,0,3,2),coloryellow;//COLORF00FF0;
DRAWICON(DIFF上穿0轴,0,'BUY') ;
DRAWTEXT(DIFF上穿0轴,MACD*2.5,'进'),colorcyan;
X1:=IF(diff<0,diff,0),COLOR0000FF,LINETHICK2;
X2:=IF(diff<0,0,diff),colormagenta,LINETHICK1;
X3:=IF(diff<dea,diff,dea),COLOR00ff00,linethick1;
X4:=IF(diff>dea,dea,dea),linethick1,COLORffbb11;
MACD金叉:=CROSS(DIFF,DEA),nodraw;
MACD低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.01,nodraw;
MACD非低位金叉:=MACD金叉 AND MACD低位金叉<1,nodraw;
STICKLINE(MACD低位金叉,DEA*0.86,DEA*0.66,6,0),coloryellow;
DRAWTEXT(MACD低位金叉,dea*1.5,' 低金'),coloryellow;
//{www.fxjgsw.com 股旁网_同花顺股票指标公式}
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
MACD二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(MACD二次金叉,DEA*1.3,DEA*0.76,6,0),ColorFF00FF;
DRAWICON(MACD二次金叉,dea*1.1,'BUY') ;
DRAWTEXT(MACD二次金叉,DEA*0.96,' -二金'),ColorFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
MACD底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(MACD底背离,DEA*1.09,DEA*0.86,6,0),Color00FF00;
DRAWLINE(A1=0,DEA,MACD底背离,DEA,0),colorred,linethick1;
DRAWTEXT(MACD底背离,DEA*2,' 底背离'),Color6600FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
MACD顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,MACD顶背离,DEA,0),colorgreen,linethick1;
DRAWTEXT(MACD顶背离,DEA*1.2,' 顶背离'),Color00FF00;
// 0轴上方强金叉
AA:=CROSS(DIFF,DEA) AND DEA>0;
T:=BARSLAST(CROSS(DEA,DIFF));
CC:=REF(BARSLAST(CROSS(DIFF,0)),T+1)<DAYS AND COUNT(DIFF>=DEA,T)=1;
MACD强金叉:=(AA AND CC),nodraw;
DRAWTEXT(MACD强金叉,DEA*0.5,'-强金'),coloryellow;
DRAWICON(MACD强金叉,dea,'BUY') ;
MACD死叉:=CROSS(DEA,DIFF),nodraw;
DRAWICON(MACD死叉,dea*1.1,'SELL') ;
MACD强金叉前溯:=COUNT(MACD强金叉,PASTDAYS);
MACD强金叉期:=MACD强金叉前溯+MACD强金叉,nodraw;
MACD金叉期:=COUNT(MACD金叉,PASTDAYS),nodraw;
MACD死叉期:=COUNT(MACD死叉,PASTDAYS),nodraw;
MACD低位金叉期:=COUNT(MACD低位金叉,PASTDAYS),nodraw;
MACD非低位金叉期:=COUNT(MACD非低位金叉,PASTDAYS),nodraw;
MACD非低位金叉期:=MACD非低位金叉期+MACD非低位金叉,nodraw;
DRAWTEXT(MACD金叉 AND (1-MACD低位金叉) AND (1-MACD二次金叉) AND (1-MACD强金叉),dea*1.1,' 金叉'),colormagenta;
DIFFOVERZERO:=CROSS(DIFF,0),nodraw;
DIFF过零轴期:=COUNT(DIFFOVERZERO,PASTDAYS),nodraw;
MACD低位金叉或过零轴期:=MACD低位金叉期+DIFF过零轴期,nodraw;
///// KDJ //////
N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K=SMA(RSV,M1,1),coloryellow,LINETHICK1;
D=SMA(K,M2,1),colorcyan,LINETHICK1;
J=3*K-2*D,colormagenta,LINETHICK1;
KDJ势增:J>REF(J,1),nodraw;
高安全区=0,colorred;
安全区=20,colorcyan;
风险区=100,colorgreen;
U1=BARSLAST(REF(CROSS(K,D),1));
U2=REF(C,U1+1)>C AND REF(K,U1+1)<K AND CROSS(K,D)AND d<50;
底背离:=IF(U2>0,1,0);
//DRAWLINE(U1=0,D,底背离,REF(D,U1),0),colorred,LINETHICK2;//DRAWLINE(底背离,D,底背离,REF(D,U1),0),colorred,LINETHICK2;//DRAWTEXT(底背离,REF(D,U1)*1.00,' 底背'),coloryellow;
rr=MAX(C,O);//www.fxjgsw.com
q1=HHV(rr,5);
q2=d<REF(d,1) AND REF(d,1)>REF(d,2);
A2=BARSLAST(REF(q2,1));
K顶背离:=(REF(q1,A2+1)<q1 AND k<REF(k,A2+1) AND q2 ),nodraw;
//DRAWLINE(A2=0 ,D,K顶背离,REF(D,A2),0),colorwhite,LINETHICK2;//DRAWLINE(K顶背离,D,K顶背离,REF(D,A2),0),colorwhite,LINETHICK2;//DRAWTEXT(K顶背离,REF(D,A2)*1.02,' 顶背'),colorgreen;
KDJ金叉=CROSS(J,K),nodraw;
KDJ死叉=CROSS(K,J),nodraw;
KDJ买点=KDJ金叉 ;
KDJ卖点=KDJ死叉;
KDJ买点期:=COUNT(KDJ买点,PASTDAYS),nodraw;
DRAWICON(KDJ买点,dea,'buy');
DRAWTEXT(KDJ买点,dea*1.6,'K'),coloryellow;
DRAWICON(KDJ卖点,dea,'sell');
DRAWTEXT(KDJ卖点,dea*1.5,'K'),colorwhite;
通:=MA(C,17),nodraw,NOText;
CROSSDAYSLAST:=BARSLAST(REF(MACD金叉,1)),nodraw;
W底右侧金叉:=MACD金叉 AND DIFF>REF(DIFF,CROSSDAYSLAST),nodraw;
W底右侧金叉期:=COUNT(W底右侧金叉,PASTDAYS),nodraw;
W底右侧最佳买点:W底右侧金叉期>0 AND C>通 AND KDJ势增,nodraw;
MACD低位金叉期:COUNT(MACD低位金叉,PASTDAYS),nodraw;
MACD最佳抄底点:MACD低位金叉期>0 AND KDJ势增>0 AND J<风险区 ,nodraw;
MACD最佳抄底期:COUNT(MACD最佳抄底点,PASTDAYS),nodraw;
MACD最佳加仓点:=DIFF上穿0轴,nodraw;
MACD最佳加仓期:=COUNT(MACD最佳加仓点,PASTDAYS),nodraw;
MACD买点:(MACD最佳抄底期>0 OR MACD最佳加仓点>0) AND (C>通) ,nodraw;
MACD买点期:COUNT(MACD买点,PASTDAYS) AND KDJ势增 AND (C>通),nodraw;
DRAWICON(MACD最佳抄底点,MIN(DEA,DIFF),'buy');
DRAWTEXT(MACD最佳抄底点 AND REF(MACD最佳抄底点,1)<1 ,IF(MIN(DEA,DIFF)>-0.1,MIN(DEA,DIFF)*2,MIN(DEA,DIFF)*1.4),'抄底'),colorcyan;
STICKLINE(MACD最佳抄底点 ,IF(MIN(DEA,DIFF)>-0.2,MIN(DEA,DIFF)*1.2,MIN(DEA,DIFF)*1),MIN(DEA,DIFF),4,0),colorred;
DRAWTEXT(MACD买点期 AND KDJ势增,IF(MIN(DEA,DIFF)>-0.2,IF(DIFF<0,MIN(DEA,DIFF)*3.6,-0.2),IF(DIFF<0,MIN(DEA,DIFF)*1.8,-0.1)),'买'),colorwhite;
DRAWTEXT( (MACD最佳抄底期 OR MACD最佳加仓点) AND KDJ势增 AND C>通,IF(MIN(DEA,DIFF)>-0.2,IF(DIFF<0,MIN(DEA,DIFF)*3.6,-0.2),IF(DIFF<0,MIN(DEA,DIFF)*1.8,-0.1)),'买'),colorred;
DRAWICON(MACD买点期 AND KDJ势增,MIN(DEA,DIFF),'buy');
DRAWICON(MACD买点期 AND KDJ势增,MIN(DEA,DIFF)-0.05,'buy');
DRAWICON(W底右侧金叉,MIN(DEA,DIFF)-0.03,'buy');
DRAWICON(W底右侧金叉,MIN(DEA,DIFF)-0.06,'buy');
STICKLINE(W底右侧最佳买点 ,IF(MIN(DEA,DIFF)>-0.2,MIN(DEA,DIFF)*1.5,MIN(DEA,DIFF)*1),MIN(DEA,DIFF),6,0),coloryellow;
|
- 软件大小:9.00 KB
- 推荐星级:
- 更新时间:2019-01-15 02:07:24
- 软件类别: 国产软件 / 同花顺公式
- 软件语言:简体中文
- 授权方式: 免费版
- 联系方式:暂无联系方式
- 官方主页: Home Page
- 点击大图: 【一键转帖到论坛】
- 插件情况:
- 运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
- 相关Tags:MACD顶背离+金叉死叉
-
(0)0%(0)0%
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!