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