ihzx 发表于 2021-8-20 01:45:45

通达信手机版macd买卖点副图公式

<p>以下是通达信手机版macd买卖点副图公式(无源码的请下载附件导入)</p>
<div class="con" id="rjsmad1"></div>
<p>通达信手机版MACD买卖点副图公式</p>
<p>公式源码</p>
<p>DIFF:EMA(CLOSE,7) - EMA(CLOSE,19);<br>
&nbsp;DEA:EMA(DIFF,9);<br>
&nbsp;MACD:2*(DIFF-DEA),COLORSTICK;<br>
&nbsp;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));<br>
&nbsp;B1:=REF(C,A1+1)&gt;C AND REF(DIFF,A1+1)&lt;DIFF AND CROSS(DIFF,DEA);<br>
&nbsp;A2:=BARSLAST(REF(CROSS(&quot;KDJ.K&quot;(9,3,3),&quot;KDJ.D&quot;(9,3,3)),1));<br>
&nbsp;B2:=REF(C,A2+1)&gt;C AND REF(&quot;KDJ.K&quot;(9,3,3),A2+1)&lt;&quot;KDJ.K&quot;(9,3,3) AND CROSS(&quot;KDJ.K&quot;(9,3,3),&quot;KDJ.D&quot;(9,3,3));<br>
&nbsp;A3:=BARSLAST(REF(CROSS(&quot;RSI.RSI1&quot;(6,12,24),&quot;RSI.RSI2&quot;(6,12,24)),1));<br>
&nbsp;B3:=REF(C,A3+1)&gt;C AND REF(&quot;RSI.RSI1&quot;(6,12,24),A3+1)&lt;&quot;RSI.RSI1&quot;(6,12,24) AND CROSS(&quot;RSI.RSI1&quot;(6,12,24),&quot;RSI.RSI2&quot;(6,12,24));<br>
&nbsp;C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));<br>
&nbsp;D1:=REF(C,C1+1)&lt;C AND REF(DIFF,C1+1)&gt;DIFF AND CROSS(DEA,DIFF);<br>
&nbsp;C2:=BARSLAST(REF(CROSS(&quot;KDJ.D&quot;(9,3,3),&quot;KDJ.K&quot;(9,3,3)),1));<br>
&nbsp;D2:=REF(C,C2+1)&lt;C AND REF(&quot;KDJ.K&quot;(9,3,3),C2+1)&gt;&quot;KDJ.K&quot;(9,3,3) AND CROSS(&quot;KDJ.D&quot;(9,3,3),&quot;KDJ.K&quot;(9,3,3));<br>
&nbsp;C3:=BARSLAST(REF(CROSS(&quot;RSI.RSI2&quot;(6,12,24),&quot;RSI.RSI1&quot;(6,12,24)),1));<br>
&nbsp;D3:=REF(C,C3+1)&lt;C AND REF(&quot;RSI.RSI1&quot;(6,12,24),C3+1)&gt;&quot;RSI.RSI1&quot;(6,12,24) AND CROSS(&quot;RSI.RSI2&quot;(6,12,24),&quot;RSI.RSI1&quot;(6,12,24));<br>
&nbsp;MACD底背:IF(B1&gt;0,-0.1,0),COLORRED,POINTDOT;<br>
&nbsp;KDJ底背:IF(B2&gt;0,-0.1,0),COLORFF00FF,POINTDOT;<br>
&nbsp;RSI底背:IF(B3&gt;0,-0.1,0),COLORYELLOW,POINTDOT;<br>
&nbsp;MACD顶背:IF(D1&gt;0,0.1,0),COLOR00FF00,POINTDOT;<br>
&nbsp;KDJ顶背:IF(D2&gt;0,0.1,0),COLORFFCC66,POINTDOT;<br>
&nbsp;RSI顶背:IF(D3&gt;0,0.1,0),COLORWHITE,POINTDOT;<br>
&nbsp;STICKLINE(B1&gt;0,-0.1,0,2,0),COLORRED;<br>
&nbsp;STICKLINE(B2&gt;0,-0.1,0,2,0),COLORFF00FF;<br>
&nbsp;STICKLINE(B3&gt;0,-0.1,0,2,0),COLORYELLOW;<br>
&nbsp;STICKLINE(D1&gt;0,0.1,0,2,0),COLOR00FF00;<br>
&nbsp;STICKLINE(D2&gt;0,0.1,0,2,0),COLORFFCC66;<br>
&nbsp;STICKLINE(D3&gt;0,0.1,0,2,0),COLORWHITE;<br>
&nbsp;STICKLINE(MACD&gt;REF(MACD,1) AND MACD&gt;0,0,MACD,0,0),COLORRED;<br>
&nbsp;STICKLINE(MACD&lt;=REF(MACD,1) AND MACD&gt;0,0,MACD,0,0),COLORYELLOW;<br>
&nbsp;STICKLINE(MACD&lt;REF(MACD,1) AND MACD&lt;0,0,MACD,0,0),COLORCYAN;<br>
&nbsp;STICKLINE(MACD&gt;=REF(MACD,1) AND MACD&lt;0,0,MACD,0,0),COLORMAGENTA;<br>
&nbsp;STICKLINE(C&gt;0,0,0,50,1),COLORBLUE;<br>
&nbsp;DIFF,COLORGREEN;<br>
&nbsp;DEA,COLORYELLOW;<br>
强:IF(DIFF&gt;MA(DIFF,2),DIFF,DRAWNULL),COLORRED,LINETHICK2;<br>
弱:IF(DEA&gt;MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA,LINETHICK2;<br>
&nbsp;DRAWICON(CROSS(DIFF,DEA),DEA,26);<br>
&nbsp;DRAWICON(CROSS(DEA,DIFF),DEA,27);<br>
&nbsp;A:=REF(DIFF,1)&lt;REF(DIFF,2) AND REF(DIFF,2)&lt;REF(DIFF,3) AND DIFF&gt;REF(DIFF,1);<br>
&nbsp;B:=REF(DIFF,1)&gt;REF(DIFF,2) AND REF(DIFF,2)&gt;REF(DIFF,3) AND DIFF&lt;REF(DIFF,1);<br>
&nbsp;DRAWICON(A,DIFF,1);<br>
&nbsp;DRAWICON(B,DIFF,2);</p>
<p></p>
页: [1]
查看完整版本: 通达信手机版macd买卖点副图公式