通达信波段趋势王主图指标公式源码
<p data-first-child ><b>通达信波段趋势王主图指标公式源码</b></p><p ><b>SHORT:=12;LONG:=26;M:=12;</b><br/><b>DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);</b><br/><b>DEA:=EMA(DIF,M);</b><br/><b>macd:=2*(DIF-DEA);</b><br/><b>KK:=IF(DIF>DEA,5,-5);</b><br/><b>JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}</b><br/><b>DD:=(MacD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值}</b><br/><b>DIF拐头价:=(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORGREEN,POINTDOT;</b><br/><b>金死叉价:=(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;</b><br/><b>柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;</b><br/><b>黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;</b><br/><b>上拐:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL),COLORRED,LINETHICK4;</b><br/><b>下拐:IF(DIF拐头价>=柱变向价,DIF拐头价,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;</b><br/><b>ZJ:=上拐,COLOR0000FF;</b><br/><b>HY:=金死叉价,COLORFF00FF;</b><br/><b>IF(ZJ>REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;</b><br/><b>IF(HY>REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;</b><br/><b>IF(HY<REF(HY,1),HY,DRAWNULL),COLORBLUE,LINETHICK2,NODRAW;</b><br/><b>STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;</b><br/><b>STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;</b><br/><b>STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;</b><br/><b>STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;</b><br/><b>STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;</b><br/><b>STICKLINE(CLOSE=ZJ,H,L,3,0),COLORWHITE;</b><br/><b>STICKLINE(CLOSE<ZJ,H,L,0,0),COLORYELLOW;</b><br/><b>STICKLINE(CLOSE<ZJ,O,C,2.5,0),COLORYELLOW;</b><br/><b>STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;</b><br/><b>STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;</b><br/><b>STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;</b><br/><b>STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;</b><br/><b>STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;</b><br/><b>HD0:=crOSS(DIF,DEA);</b><br/><b>买入准备:DRAWICON(CROSS(柱变向价,DIF拐头价),上拐,34);</b><br/><b>卖出准备:DRAWICON(CROSS(DIF拐头价,柱变向价),下拐,35);</b><br/><b>SBL:=STRCAT(STRCAT(STRCAT(STRCAT(DYBLOCK,HYBLOCK),FGBLOCK),GNBLOCK),ZDBLOCK);</b><br/><b>DRAWTEXT_FIX(ISLASTBAR,0.01,0.005,0,SBL),COLORCYAN;</b></p><p ></p><p></p> 路过,支持一下啦 楼主哪儿来的这么多好东西!
页:
[1]