当前位置:→ 股海网飞狐公式 → 正文
  • MACD副图源码

  • 相关简介:有三个红箭头或两个绿箭头的选股公式{★MACD-(快速)} input: P(19,15,100), S(7,5,140), M(9,2,80); {-----------------------☆功能开关------------------------} {资金} ZJ1:=DMA((H+L+C*2)/4,0.9); ZJ2:=V/((H-L)*2-ABS(C-O)); ZJ3:=IF(CO,ZJ2*(H-L),IF(CO,ZJ2*(H-O+(C-L)),V/2))+IF(CO,0-ZJ2*(

  • 文章来源:股海网作者:股海网发布时间:2015-04-17浏览次数:下载次数:0

有三个红箭头或两个绿箭头的选股公式{★MACD-(快速)}

input: P(19,15,100), S(7,5,140), M(9,2,80);

{-----------------------☆功能开关------------------------}
 {资金}
ZJ1:=DMA((H+L+C*2)/4,0.9); ZJ2:=V/((H-L)*2-ABS(C-O));
 ZJ3:=IF(C>O,ZJ2*(H-L),IF(C<O,ZJ2*(H-O+(C-L)),V/2))+IF(C>O,0-ZJ2*(H-C+(O-L)),IF(C<O,0-ZJ2*(H-L),0-V/2));
 ZJ4:=ZJ3/20/1.15; ZJ5:=ZJ4*0.55+REF(ZJ4,1)*0.33+REF(ZJ4,2)*0.22; ZJ6:=EMA(ZJ5,3);
 {macd}
 MJ_1 := EMA(CLOSE,S) - EMA(CLOSE,P);
 MJ_2 := EMA(MJ_1,M);
 MJ_3 := 2*(MJ_1-MJ_2);
 MJ_4:=REVERSE(MJ_3)+2*WMA(WMA(MJ_3,1),5);
 MJ_5:=3*MJ_4-2*SMA(MJ_4,2,1);
 {形态}
低金:=CROSS(MJ_1,MJ_2) AND MJ_1<-0.1;{低金}
SA0:=COUNT(CROSS(MJ_1,MJ_2) AND MJ_2<0,21)=3;
零下二次金叉:=CROSS(MJ_3,0) and SA0;{零下二次金叉}
SA1:=COUNT(CROSS(MJ_1,MJ_2),BARSLAST(MJ_2>=0));
二金:=(CROSS(MJ_1,MJ_2) AND MJ_2<0 AND COUNT(SA1=2,21)=1)*2;{二次金叉}
SA2:=BARSLAST(REF(CROSS(MJ_1,MJ_2),1));
底背:=(REF(C,SA2+1)>C AND MJ_1>REF(MJ_1,SA2+1) AND CROSS(MJ_1,MJ_2))*3;{底背}
三全:=低金 AND 二金 AND 底背;
SA3:=BARSLAST(REF(CROSS(MJ_2,MJ_1),1));
顶背:=REF(C,SA3+1)<C AND REF(MJ_1,SA3+1)>MJ_1 AND CROSS(MJ_2,MJ_1);{顶背}
 {信号}
M_C1:=EMA(C,5)/EMA(EMA(C,9),16)<=0.85 and c/ref(c,1)<1.05 and c/ref(c,1)>0.905 and V/CAPITAL*100<5;
 M_C2:=MIN(ref(C,2)*0.865,ref(c,13)*0.772); M_C3:=(C-M_C2)/C<0.03; 满仓:=M_C1 and M_C3;
 {估测转折股价--未来}
X:=BarsLast(Backset(ISLASTBAR,1)=1)+1;
 Z_1:=REF(MJ_2,1)+((M+1)/(2*(M-1)))*REF(MJ_3,1);
 Z_2:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_1,1))/(2*P-2*S);
 Z_3:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_2,1))/(2*P-2*S);
 Z_4:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*Z_1)/(2*P-2*S);
 Y_1:=(MJ_2*X+((M+1)/(2*(M-1)))*MJ_3*X);
 Y_2:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_1*X)/(2*P-2*S);
 Y_3:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_2*X)/(2*P-2*S);
 Y_4:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*Y_1)/(2*P-2*S);

{-----------------【图解模板】---------------------}
DRAWGBK(C,COLORRGB(36,68,36),COLORRGB(100,100,100),1);

{MACD}
 FILLRGN(MJ_1>=MJ_2,MJ_1,MJ_2),Color689AFF;
 FILLRGN(MJ_1<MJ_2,MJ_2,MJ_1),ColorFFC000;
 FILLRGN(MJ_3>MJ_5,MJ_5,MJ_3),ColorFFB7FF;
 FILLRGN(MJ_3<MJ_5,MJ_5,MJ_3),Color003E00;
 STICKLINE(MJ_3<ref(MJ_3,1) and MJ_3<0,0,MJ_3,0,0),ColorFFCF78;{蓝}
STICKLINE(MJ_3<ref(MJ_3,1) and MJ_3>0,0,MJ_3,0,0),COLORYELLOW;{黄}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3<0,0,MJ_3,0,0),ColorAF00AF;{紫}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3>0,0,MJ_3,0,0),COLORRED;{红}
DIFF: MJ_1,PRECISION2,COLORWHITE;
 DEA: MJ_2,PRECISION2,COLORYELLOW;
加速:2.8*(MJ_2-MJ_1),LINETHICK,PRECISION2,COLORGREEN;
 PARTLINE(RANGE(BARPOS,SYSPARAM(3)-34,SYSPARAM(3)+1),加速),LINEDOT,COLORGREEN;
多头: MJ_3,LINETHICK2,PRECISION2,COLORRED;
预警:MJ_5,PRECISION2,ColorFF8900,ColorFFB500;
 PARTLINE(MJ_1>=REF(MJ_1,1) AND MJ_2<REF(MJ_2,1),MJ_1),LINETHICK2,COLORMAGENTA;//粉
PARTLINE(MJ_1<REF(MJ_1,1) AND MJ_2>REF(MJ_2,1),MJ_1),LINETHICK2,COLORBLUE;//蓝
{资金}
PARTLINE(1,0),LINETHICK2,COLORWHITE;//负
PARTLINE(ZJ6>=0,0),LINETHICK2,COLORRED;//正
{形态}
DRAWTEXT(低金,DEA*0.98,'▲'),PXDN8,Color00C300;
 DRAWTEXT(零下二次金叉,DEA*0.98,'▲ \n▲'),PXDN8,Color00C300;
 DRAWTEXT(二金,DEA*0.98,'▲ \n▲'),PXDN8,Color00C300;
 DRAWTEXT(底背,DEA*0.98,' \n \n↑'),PXDN8,COLORMAGENTA;
 DRAWTEXT(三全,DEA*0.98,'▲ \n▲ \n▲'),PXDN8,COLORRED;
 DRAWTEXT(顶背,DEA,'▼ \n▼'),PXUP60,ColorFF5B00;
 {信号}
VERTLINE(满仓),LINEDOT,COLORGRAY;
 DRAWTEXT(满仓,加速,' 第 \n 二 \n 天 \n 买 \n'),ALIGN,COLORYELLOW;
 DRAWICON(满仓,MJ_1*0.96,1),ALIGN,PXDN10;//多空差:34.47 成功率:83.08%
 {估测转折股价--未来}
DRAWTEXTEX(sysparam(3)=BARPOS,0,6,2,'今日DIFF转折: '+NUMTOSTR(Z_2,2)),COLORGREEN;
 DRAWTEXTEX(sysparam(3)=BARPOS,0,6,20,'今日DEA转折: '+NUMTOSTR(Z_3,2)),COLORGREEN;
 DRAWTEXTEX(sysparam(3)=BARPOS,0,6,38,'今日MACD转折:'+NUMTOSTR(Z_4,2)),COLORGREEN;
 DRAWTEXTEX(sysparam(3)=BARPOS,0,6,94,'明日DIFF转折: '+NUMTOSTR(Y_2,2)),COLORYELLOW;
 DRAWTEXTEX(sysparam(3)=BARPOS,0,6,112,'明日DEA转折: '+NUMTOSTR(Y_3,2)),COLORYELLOW;
 DRAWTEXTEX(sysparam(3)=BARPOS,0,6,130,'明日MACD转折: '+NUMTOSTR(Y_4,2)),COLORYELLOW;
换手:if(capital=0,v/sum(v,100)*100,v/FINANCE(7)),PRECISION2,LINETHICK,COLORGRAY;
涨跌幅:(C-REF(C,1))/REF(C,1)*100,PRECISION2,LINETHICK,COLORGRAY;
 {取参数}
GDT2:=FINANCE(0);//报表最新日期
XXx:=STRTONUM(STRRIGHT(NUMTOSTR(FINANCE(0),0),2));//取右两位数
Nn:=IF(XXx>11 OR XXx<3,1,IF(BETWEEN(XXx,2.9,6),4,IF(BETWEEN(XXx,5.9,9),2,4/3))),LINETHICK;
市赢率:C/(FINANCE(33)*Nn),PRECISION2,LINETHICK,COLORGRAY;
市净率:C/FINANCE(34),PRECISION2,LINETHICK,COLORGRAY;

MACD副图源码

 ☟问题反馈 ☞┄┄┄┄┄┄┄┄┄┄→收藏资源:

MACD副图源码

  • 下载资源所需积分

    0

  • 当前拥有积分

    0

上传会员: 
股海网
文件大小: 
Bytes
上传时间: 
2015-04-17
下载积分: 
-
免责声明: 
请仔细阅读并同意后才能下载
本附件为用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究使用,不得用于商业或者非法用途,如有侵犯您的版权, 请参看 《股海网侵权处理流程》《股海网免责声明条款》
点击下载无反应时,更换主流浏览器重新登录操作,如360浏览器、Edge浏览器、谷歌浏览器,个别浏览器有不兼容现象。
勾选以下表示您已经阅读并同意以上声明才能下载本文件,扣除积分无法退还!
我已阅读所有条款规定, 请点我同意 所有条款内容!我自愿下载!
提示:如下载失败,请点关闭刷新此页面或提交问题反馈给管理员→
关闭

关于我们 - 联系我们 - 隐私政策 - 免责声明 - 下载帮助 - 广告合作 - SiteMap - TOP
增值电信业务经营ICP许可证:湘B2-20210269 湘ICP备09016573号-10 湘公网安备43108102000040号
Copyright © 2021 铭网科技,All Rights Reserved.