公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 飞狐公式 > 正文 → 正文

飞狐MACD解盘副图指标

发布时间:2016/6/15 5:50:48  浏览次数:

飞狐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解盘副图指标

资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识