冀苍鸾 发表于 2024-5-8 18:35:00

MACD幅图指标全集,总有一个适合你,选择适合的指标(源码免费)

<p data-first-child ><b>大家好!今天跟大家分享一些MACD的指标,我们都知道MACD是属于趋势类的指标</b></p><p ><b>但他有拥有一定的市场空间,在我们这个市场中还是有许多的朋友喜欢,那我今天就把我的</b></p><p ><b>私有的MACD指标分享出来,看看你喜欢哪一个</b></p><blockquote ><b>①:公式代码复制过来难免造成部分格式错误。如出现公式导入错误,请及时私信留言笔者领取nt6文件可直接导入!如果对于指标感兴趣或者有疑问的可以与我一起交流学习!指标源码导入就可以使用。</b><br/><b>②:创作不易,希望大家对于我的文章能够关注和转发,后期也会给大家分享更多好用的指标以及其他股票知识的!</b></blockquote><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><p class="ztext-empty-paragraph"><br/></p><h2>源码:幅图1</h2><p >DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);</p><p >DEA:EMA(DIF,MID);</p><p >MACD:(DIF-DEA)*2,COLORSTICK;</p><h2>幅图2</h2><p >DIF:EMA(VOL,SHORT)-EMA(VOL,LONG);</p><p >DEA:EMA(DIF,MID);</p><p >MACD:DIF-DEA,COLORSTICK;</p><h2>幅图3</h2><p >TJ:=MACD>0;</p><p >T:=MACD<0;</p><p >A:=LLV(MACD,50)=MACD;</p><p >DRAWICON(A AND FILTERX(A,20), MACD,1);</p><p >{DRAWTEXT(BARSLAST(TJ)=1,MACD-0.1,'1'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=2,MACD-0.1,'2'),COLORYELLOW;}</p><p >DRAWTEXT(BARSLAST(TJ)=3,MACD-0.1,'3'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=5,MACD-0.1,'5'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=8,MACD-0.1,'8'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=13,MACD-0.1,'13'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=21,MACD-0.1,'21'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=34,MACD-0.1,'34'),COLORYELLOW;</p><p >DRAWTEXT(BARSLAST(TJ)=55,MACD-0.1,'55'),COLORYELLOW;</p><p >{DRAWTEXT(BARSLAST(T)=1,MACD+0.1,'1'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=2,MACD+0.1,'2'),COLORGREEN;}</p><p >DRAWTEXT(BARSLAST(T)=3,MACD+0.1,'3'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=5,MACD+0.1,'5'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=8,MACD+0.1,'8'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=13,MACD+0.1,'13'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=21,MACD+0.1,'21'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=34,MACD+0.1,'34'),COLORGREEN;</p><p >DRAWTEXT(BARSLAST(T)=55,MACD+0.1,'55'),COLORGREEN;</p><p >DIF:EMA(CLOSE,12)-EMA(CLOSE,26);</p><p >DEA:EMA(DIF,9);</p><p >MACD:(DIF-DEA)*2,COLORSTICK;</p><p >低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;</p><p >STICKLINE(低位金叉,0,-0.18,0,0),COLORYELLOW;</p><p >DRAWTEXT(低位金叉,-0.15,' 低位金叉'),COLORRED;</p><p >JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));</p><p >二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;</p><p >STICKLINE(二次金叉,0,-0.18,0,0),COLORFF00FF;</p><p >DRAWTEXT(二次金叉,-0.3,' 二次金叉'),COLORFF00FF;</p><p >A1:=BARSLAST(REF(CROSS(DIF,DEA),1));</p><p >底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);</p><p >STICKLINE(底背离,0,0.13,1,0),COLOR00FF00;</p><p >DRAWTEXT(底背离,0.18,' 底背离'),COLOR00FF00;</p><p >A2:=BARSLAST(REF(CROSS(DEA,DIF),1));</p><p >顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);</p><p >DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.51,'三重'),COLORYELLOW,LINETHICK1;</p><p >DRAWTEXT(低位金叉 AND 底背离,0.31,'二重'),COLORLIBLUE,LINETHICK1;</p><p >上翘:IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK1;</p><p >下拐:IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORLIBLUE,LINETHICK1;</p><p >A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));</p><p >B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");</p><p >DRAWTEXT(B3>0,-0.2,'RSI底离'),COLORCYAN;{RSI底背离};</p><p >C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));</p><p >D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");</p><p >DRAWTEXT(D3>0,0.3,'RSI顶离'),COLORGREEN;{RSI顶背离};</p><p >DRAWTEXT_FIX(1,0.0,0.1,0,''),COLORRED,LINETHICK1;</p><p >幅图4</p><p >SHORT:=12;LONG:=26;MID:=9;</p><p >D1:=EMA(C,3)-EMA(C,8);</p><p >D2:=EMA(O,3)-EMA(O,8);</p><p >D3:=EMA(H,3)-EMA(H,8);</p><p >D4:=EMA(L,3)-EMA(L,8);</p><p >STICKLINE(D1>=D2,D1,D2,3,0),COLOR0055AA;</p><p >STICKLINE(D1<=D2,D1,D2,3,0),COLOR006600;</p><p >STICKLINE(D1>=D2,D1,D2,2,0),COLOR0077CC;</p><p >STICKLINE(D1>=D2,D1,D2,1,0),COLOR0099DD;</p><p >STICKLINE(D1>=D2,D3,D4,0,0),COLOR00BBFF;</p><p >STICKLINE(D1<=D2,D1,D2,2,0),COLOR009900;</p><p >STICKLINE(D1<=D2,D1,D2,1,0),COLOR00BB00;</p><p >STICKLINE(D1<=D2,D3,D4,0,0),COLOR00EE00;</p><p >DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORCYAN,LINETHICK1;</p><p >DEA:EMA(DIF,MID),COLOR66CC00,LINETHICK1;</p><p >TJ1:EMA(DEA,4),COLOR999933,LINETHICK1;</p><p >TJ2:=EMA(DIF,17),COLORBLUE,LINETHICK1;</p><p >MACD:(DIF-DEA)*2,COLORSTICK;</p><p >IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORWHITE,LINETHICK2;</p><p >IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORRED,LINETHICK2;</p><p class="ztext-empty-paragraph"><br/></p><p >IF(TJ1>REF(TJ1,1),TJ1,DRAWNULL),COLORMAGENTA,LINETHICK2;</p><p >{IF(TJ2>REF(TJ2,1),TJ2,DRAWNULL),COLORWHITE,LINETHICK3;}</p><p >0,COLORGRAY,LINETHICK1;</p><p></p>
页: [1]
查看完整版本: MACD幅图指标全集,总有一个适合你,选择适合的指标(源码免费)