麻烦大神写个MACD顶背离的公式

当MACD金叉的时候 MACD能量柱小于昨日的MACD能量柱 时 当期MACD金叉后的最高值 小于上一次MACD金叉后的最高值例如 上证指数 2017年2月14日 -- 2017年4月12日

MACD顶底背离副图

DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),COLORSTICK;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;
KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;
RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;
MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;
KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(B1>0,-0.1,0,2,0),COLORRED;
STICKLINE(B2>0,-0.1,0,2,0),COLORFF00FF;
STICKLINE(B3>0,-0.1,0,2,0),COLORYELLOW;
STICKLINE(D1>0,0.1,0,2,0),COLOR00FF00;
STICKLINE(D2>0,0.1,0,2,0),COLORFFCC66;
STICKLINE(D3>0,0.1,0,2,0),COLORWHITE;
温馨提示:内容为网友见解,仅供参考
无其他回答

求高手改写macd,顶背离选股公式
MACD:=2*(DIFF-DEA);C1:=BARSLAST(REF(CROSS( DEA,DIFF ),1));XG:REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);

macd顶背离和底背离指标公式
1. MACD线的计算公式MACD Line = 12日EMA线 - 26日EMA线其中,EMA是指数平均数,计算方式为:今日EMA(12)= 前一日EMA(12)×11\/13 + 今日收盘价×2\/13。今日EMA(26)的计算公式类似。2. 信号线的计算公式Signal Line = 9日MACD Line的EMA平均值计算方式为:今日EMA(9) = 前一日EMA...

求MACD柱线与股价的背离,公式
MACD : 2*(DIFF-DEA), COLORSTICK,COLOR5454FF;DD:=C=HHV(C,180);EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;上升背离:(CC AND EE)*DEA,COLOR00FFFF;顶背离:(DD AND EE AND DEA< HHV(DEA,180))*DEA,STICK,LIN...

求大智慧MACD底背离和顶背离公式
如果你想要的公式效果如下可以联系我由于字数限制代码过长背离时会画线不背离时不会画线,并且只提示最近的.

求通达信MACD红绿柱背离预警公式,我要的是MACD红绿柱相邻的两个红柱浪...
MACD:=(DIF-DEA)*2,COLORSTICK;底背离:C<=LLV(C,60) AND MACD>LLV(MACD,60) AND MACD>=REF(MACD,1);别忘了把参数加上,SHORT是12,LONG是26,MID是9 DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIF,MID);MACD:=(DIF-DEA)*2,COLORSTICK;顶背离:C>=LLV(C,60) AND MACD<...

求助老师:如何编写macd底背离的选股公式
顶背离,DEA,0),COLORGREEN,LINETHICK2;=== {选股} DIFF:=EMA(C,12)-EMA(C,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:REF(C,A1+1)>C AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);

哪位老师有通达信MACD柱体背离的指标公式分享一个,真心感谢
MACD : =2*(DIFF-DEA);DD:=C=HHV(C,180);EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;FF:=C=LLV(C,180);GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;LL:=C< REF(C,1) AND REF(C< REF...

求大智慧RSI、CCI、KDJ、MACD顶背离和底背离选股公式
K顶背离:=GDGJ AND KGZB;MACD:="MACD.MACD";MDZB:=REF(MACD,DDSJ+1)<MACD;M底背离:=DDGJ AND MDZB;MGZB:=REF(MACD,GDSJ+1)>MACD;M顶背离:=GDGJ AND MGZB;RSI:="RSI.RSI1";RDZB:=REF(RSI,DDSJ+1)<RSI;R底背离:=DDGJ AND RDZB;RGZB:=REF(RSI,GDSJ+1)>RSI;R顶背离:=G...

macd顶背离选股公式
macd顶背离选股公式源码 DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);DEA:EMA(DIFF,9);MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)CLOSE AND DIFFREF(DIFF,A1+1) AND CROSS(DIFF,DEA);STICKLINE(底...

收藏| Macd指标背离用法大全+选股公式
背离是股价或指数不断创新低(高)时,某些技术指标未随之创新低(高),形成的技术性差异。MACD指标的背离是指其图形走势与K线图方向相反。1. 顶背离:价格持续上涨,创新高,但MACD红柱未创新高,表示价格虽创新高,但动能不足,预示未来可能下跌。2. 底背离:价格持续下跌,创新低,而MACD绿柱未...

相似回答