当前位置:→ 股海网飞狐公式 → 正文
  • 飞狐MACD解盘副图指标

  • 相关简介:飞狐MACD解盘副图指标 源码 INPUT:LONG(26,20,100),SHORT(12,5,40),M(9,2,60); DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORCCFFFF; MACD:EMA(DIF,M),COLOR58FF58; DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0; STICKLINE(DEF=0 AND DEF=REF(DEF,1),0,DEF,6,1),COLOR6058FF; STICKLI

  • 文章来源:股海网作者:股海网发布时间:2016-06-09浏览次数:下载次数:0

飞狐MACD解盘副图指标

源码

INPUT:LONG(26,20,100),SHORT(12,5,40),M(9,2,60);
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORCCFFFF;
MACD:EMA(DIF,M),COLOR58FF58;
DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0;
STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLOR6058FF;
STICKLINE(DEF>=0 AND DEF< REF(DEF,1),0,DEF,6,0),COLOR6058FF;
STICKLINE(DEF<0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLORFFFF00;
STICKLINE(DEF<0 AND DEF< REF(DEF,1),0,DEF,6,0),COLORFFFF00;
PARTLINE(DIF<1000,0),COLORBROWN;
多头趋势:=IF(DIF>=0 AND MACD>=0 OR (DIF<0 AND MACD>=0),1,0);
空头趋势:=DIF<0 AND MACD<0 OR (DIF>=0 AND MACD<0);
缩头:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),1,0);
缩脚:=IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),1,0);
阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);
支撑:=IF(CROSS(MA(C,20),C) OR CROSS(MA(C,60),C),1,0);
做多:=IF(CROSS(MACD,DIF) AND DIF>0 AND MACD>0,1,0);
放空:=IF(CROSS(DIF,MACD) AND DIF<0 AND MACD<0,1,0);
DRAWICON(多头趋势,DIF,10),ALIGN4;
DRAWICON(空头趋势,DIF,11),ALIGN5;
PARTLINE(DIF<1000,DIF),,COLORCCFFFF,LINETHICK2;
PARTLINE(MACD<1000,MACD),COLOR58FF58;
DRAWICON(FILTER(缩头,3) AND 缩头,DEF+0.01,5),ALIGN0;
DRAWICON(FILTER(缩脚,3) AND 缩脚,DEF,4),ALIGN1;
DRAWICON(FILTER(阻力,16) AND DEF>=0,DEF+0.01,12),ALIGN0;
DRAWICON(FILTER(支撑,16) AND DEF<0,DEF,12),ALIGN1;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
EXPLAIN(多头趋势, '§§§§长线为多头趋势§§§§'),COLORRED;
EXPLAIN(空头趋势, '§§§§长线为空头趋势§§§§'),COLORGREEN;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
EXPLAIN(缩头, '§请注意DEF柱状缩头'),COLORFFFF00;
EXPLAIN(缩脚, '§请注意DEF柱状缩脚'),COLORFFFF00;
EXPLAIN(FILTER(支撑,16) AND DEF<0, '§DEF柱状特殊研判'),COLORFFFF00;
EXPLAIN(做多=0 AND FILTER(支撑,16) AND DEF<0, '§多头注意今明两日低点支撑'),COLORFFFF00;
EXPLAIN(FILTER(阻力,16) AND DEF>=0, '§DEF柱状特殊研判'),COLORFFFF00;
EXPLAIN(放空=0 AND FILTER(阻力,16) AND DEF>=0, '§空头注意今明两日高点压力'),COLORFFFF00;
EXPLAIN(做多, '§多头注意今明两日低点支撑'),COLORFFFF00;
EXPLAIN(做多,'§找日出K线做多,用线控盘'),COLORFFFF00;
EXPLAIN(放空,'§空头注意今明两日高点压力'),COLORFFFF00;
EXPLAIN(放空,'§找日落K线放空,用线控盘'),COLORFFFF00;
EXPLAIN(CROSS(MACD,0), '§注意长线趋势空转多'),COLORRED;
EXPLAIN(CROSS(0,MACD), '§注意长线趋势多转空'),COLORGREEN;
A:=C>=REF(C,2);
B:=C< REF(C,2);
ZA:=BARSLAST(A);
ZB:=BARSLAST(B);
LA:=REF(L,ZA);
HB:=REF(H,ZB);
EXPLAIN(多头趋势 AND C< LA, '§防守价跌破:多头小心'),COLORRED;
EXPLAIN(空头趋势 AND C>HB, '§防守价突破:空头小心'),COLORRED;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
EXPLAINEX(多头趋势, 'MACD多头防守价:',LA,2,0),COLOR3399FF ;
EXPLAINEX(空头趋势, 'MACD空头防守价:',HB,2,0),COLOR3399FF ;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
EXPLAIN((COUNT(C>REF(C,1),30)>18 AND (COUNT(C>REF(C,1),3)=3)) AND (COUNT(DEF< REF(DEF,1),30)>18),'§反转--股价将可能反转向下'),COLOR58FF58;
EXPLAIN((COUNT(C< REF(C,1),30)>18 AND (COUNT(C< REF(C,1),3)=3)) AND (COUNT(DEF>REF(DEF,1),30)>18),'§反转--股价将可能反转向上'),COLOR58FF58;
EXPLAIN(DEF<0 AND ABS(DEF)>REF(ABS(DEF),1),'§MACD绿柱增长'),COLOR58FF58;
EXPLAIN(DEF<0 AND ABS(DEF)< REF(ABS(DEF),1),'§MACD绿柱缩短'),COLOR58FF58;
EXPLAIN(DEF>0 AND DEF>REF(DEF,1),'§MACD红柱增长'),COLOR58FF58;
EXPLAIN(DEF>0 AND DEF< REF(DEF,1),'§MACD红柱缩短'),COLOR58FF58;
EXPLAIN((LLV(L,60)=L) AND (NOT(LLV(MACD,60)=MACD)),'§底背离--属买入信号'),COLOR58FF58;
EXPLAIN((HHV(H,60)=H) AND (NOT(HHV(MACD,60)=MACD)),'§顶背离--属卖出信号'),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF) AND MACD<0,'§MACD在0轴下死叉'),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND MACD<0,'§MACD在0轴下金叉'),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD),'§金叉--属买入信号'),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF),'§死叉--属卖出信号'),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND MACD>0,'§MACD在0轴上金叉'),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF) AND MACD>0,'§MACD在0轴上死叉'),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND CROSS(DEF,0),'§上穿0轴,可考虑买入'),COLOR58FF58;
EXPLAIN(FILTER(CROSS(DIF,MACD) AND MACD>0,13),'§高位金叉'),COLOR58FF58;
EXPLAIN(FILTER(CROSS(DIF,MACD) AND MACD<0,6),'§低位金叉'),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=2 AND CROSS(DIF,MACD) AND
MACD>0,'§0轴上二次金叉'),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=3 AND CROSS(DIF,MACD) AND
MACD>0,'§0轴上三次金叉'),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=4 AND CROSS(DIF,MACD) AND MACD>0,'§0轴上四次金叉'),COLOR58FF58;
EXPLAIN(COUNT(CROSS(MACD,DIF),20)=2 AND CROSS(MACD,DIF),'§二次死叉,跌幅可能较深'),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD),20)=2 AND CROSS(DIF,MACD),'§二次金叉,涨幅可能较大'),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF>=0 AND DEF<=REF(DEF,1),'§上涨趋势有所减缓,短线投资者可逢高卖出,但当回落至均线或其他支撑位时应及时回补'),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF>0 AND DEF>REF(DEF,1),'§目前正处于反弹阶段,应保持谨慎'),COLOR58FF58;
EXPLAIN(DEF>0 AND DIF>0 AND DIF>MACD AND DIF>REF(DIF,1) AND C>REF(C,1),'§上升趋势尚未改变'),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF>0 AND DEF< REF(DEF,1),'§短线反弹已经结束,应继续坚持谨慎原则'),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF<=0 AND DEF< REF(DEF,1),'§有加速下跌趋势'),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF<=0 AND DEF>=REF(DEF,1),'§下跌趋势有所减缓,可在W&R指标大于90时逢低买入,但有可能再次加速下跌,注意及时止损'),COLOR58FF58;
EXPLAIN(DEF<0 AND DIF<0 AND DIF< MACD AND DIF< REF(DIF,1) AND C< REF(C,1),'§下降趋势尚未改变'),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF>=0 AND DEF>REF(DEF,1),'§有加速上涨趋势'),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF<0 AND DEF< REF(DEF,1),'§目前正处于回落整理阶段,且回落有加速趋势'),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF<0 AND DEF>=REF(DEF,1),'§目前正处于回落整理阶段,但整理即将结束,可在均线或其他支撑位附近逢低买入,但当整理完成后选择再次向下突破时应注意及时止损'),COLOR58FF58;
EXPLAIN(DEF<-0.35,'§超卖中,随时有可能反弹'),COLOR58FF58;
EXPLAIN(DEF>0.35,'§股价超买中,随时有可能回档'),COLOR58FF58;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
G:=26;
S:=12;
CC:=CLOSE;
ESS:=EMA(CC,12);
EGG:=EMA(CC,12);
RDIF:=REF(DIF,1);
RSS:=REF(ESS,1);
RGG:=REF(EGG,1);
RMACD:=REF(MACD,1);
RDEF:=REF(DEF,1);
RZZZ:=(RMACD+((M+1)/(2*(M-1)))*RDEF);
XDIF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDIF)/(2*G-2*S);
XMACD:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RMACD)/(2*G-2*S);
XDEF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RZZZ)/(2*G-2*S);
AA:=ISLASTBAR;
BB:=BACKSET(AA=1,1);
Y:=BARSLAST(BB=1);
X:=Y+1;
TDIF:=DIF*X;
TSS:=ESS*X;
TGG:=EGG*X;
TMACD:=MACD*X;
TDEF:=DEF*X;
TZZZ:=(TMACD+((M+1)/(2*(M-1)))*TDEF);
YDIF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDIF)/(2*G-2*S);
YMACD:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TMACD)/(2*G-2*S);
YDEF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TZZZ)/(2*G-2*S);
EE:=1;
EXPLAINEX(EE=1,'DIF....今日转折:',XDIF,2,1),COLORCCFFFF ;
EXPLAINEX(EE=1,'MACD今日转折:',XMACD,2,1),COLOR3399FF ;
EXPLAINEX(EE=1,'DEF...今日转折:',XDEF,2,1),COLORFF9966 ;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;
EXPLAINEX(EE=1,'DIF....明日转折:',YDIF,2,1),COLORCCFFFF;
EXPLAINEX(EE=1,'MACD明日转折:',YMACD,2,1),COLOR3399FF;
EXPLAINEX(EE=1,'DEF...明日转折:',YDEF,2,1),COLORFF9966;
EXPLAIN(DIF<1000,'----------------------------------------------------------------------------'),COLORBROWN;

飞狐MACD解盘副图指标

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

飞狐MACD解盘副图指标

  • 下载资源所需积分

    0

  • 当前拥有积分

    0

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

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