通达信公式——MACD背离副图指标(附源码)
DIFF:EMA(CLOSE,7) - EMA(CLOSE,19);
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) A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1)); 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) STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORRED; STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORYELLOW; STICKLINE(MACD STICKLINE(MACD>=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORMAGENTA; STICKLINE(C>0,0,0,50,1),COLORBLUE; DIFF,COLORGREEN; DEA,COLORYELLOW; 强:IF(DIFF>MA(DIFF,2),DIFF,DRAWNULL),COLORRED,LINETHICK2; 弱:IF(DEA>MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA,LINETHICK2; A:=REF(DIFF,1)REF(DIFF,1); B:=REF(DIFF,1)>REF(DIFF,2) AND REF(DIFF,2)>REF(DIFF,3) AND DIFF 本人承诺,本人不绝对不收取任何费用,免费分享给各位粉丝朋友,各位粉丝朋友们的支持是最大的动力! 本人独创的技术和指标,不会使用或者有需要指标(全套源码)的朋友可以私信找我领取!