通达信波段重心指标公式源码 附效果图
<p data-first-child ><b>使用说明:</b> 适用通达信软件使用,别的软件使用要改编代码。</p><p ><b>直接复制以下源代码,在公用管理器中新构建指标公用,复制进去就可以用了(仅供参考,下面有效果图,可以先看看指标显示出来效果如何):</b></p><p >A1:=(CLOSE*2+HIGH+LOW)/4;</p><p >A2:=EMA(A1,13)-EMA(A1,34);</p><p >A3:=EMA(A2,5);</p><p >重心: 2*(A2-A3)*3.8,COLORSTICK;</p><p >J:=重心;</p><p >STICKLINE(J>REF(J,1),HHV(J,3),LLV(J,3),0,0),COLOR000088;</p><p >STICKLINE(J>REF(J,1),J,REF(J,1),3,0),COLOR0000AA;</p><p >STICKLINE(J>REF(J,1),J,REF(J,1),1.5,0),COLOR0000CC;</p><p >STICKLINE(J>REF(J,1),J,REF(J,1),0,0),COLOR0000EE;</p><p >STICKLINE(J<REF(J,1),HHV(J,3),LLV(J,3),0,0),COLORFFAA00;</p><p >STICKLINE(J<REF(J,1),J,REF(J,1),3,0),COLORFF4400;</p><p >STICKLINE(J<REF(J,1),J,REF(J,1),1.5,0),COLORFF8800;</p><p >STICKLINE(J<REF(J,1),J,REF(J,1),0,0),COLORFFAA00;</p><p >DIF:=EMA(CLOSE,12) - EMA(CLOSE,26);</p><p >DEA:=EMA(DIF,9);</p><p >MACD:=2*(DIF-DEA);</p><p >DRAWTEXT(DIF>DEA,-0.2,'★'),COLOR00FFFF;</p><p >PEG:(C/FINANCE(33))/(FINANCE(21)/FINANCE(20)+0.038)/100,NODRAW;</p><p >RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;</p><p >K:=SMA(RSV,3,1);</p><p >D:=SMA(K,3,1);</p><p >J1:=3*K-2*D;</p><p >DRAWTEXT(J1>D,-0.3,'★'),COLORRED;</p><p >TYP:=(HIGH + LOW + CLOSE)/3;</p><p >CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));</p><p >卖:= CROSS(100,CCI);</p><p >买:= CROSS(CCI,-100);</p><p >买2:=CROSS(CCI,100);</p><p >DRAWICON(卖,J+0.1,8),NODRAW;</p><p >DRAWICON(买,J-0.1,9);</p><p >DRAWICON(买2,J+0.1,10),NODRAW;</p><p >LC:=REF(CLOSE,1);</p><p >RSI2:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;</p><p >R6:=(SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100),COLORRED,LINETHICK2;</p><p >IF( R6>50 AND R6<100,0,DRAWNULL),COLORYELLOW,LINETHICK5,NODRAW;</p><p >MR持股:= K>D AND K>REF(K,1) AND DIF>DEA AND DIF>REF(DIF,1)AND R6>50 AND R6>REF(R6,1) AND C>BBI AND BBI>REF(BBI,1);</p><p >IF(MR持股,J/3,DRAWNULL),COLORFFFF00,LINETHICK8;</p><p >MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);</p><p >HD :=HIGH-REF(HIGH,1);</p><p >LD :=REF(LOW,1)-LOW;</p><p >CXHWZ1:=STRCAT(':',' A26206');</p><p >CXHWZ2:=STRCAT('众号',CXHWZ1);</p><p >CXHWZ3:=STRCAT('关注公',CXHWZ2);</p><p >DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);</p><p >DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);</p><p >PDI:=DMP*100/MTR,LINETHICK3,NODRAW;</p><p >MDI:=DMM*100/MTR,LINETHICK3,NODRAW;</p><p >ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6),NODRAW;</p><p >ADXR:=EXPMEMA(ADX,6),NODRAW;</p><p >IF(ADX>=ADXR,0,DRAWNULL),COLORMAGENTA,LINETHICK6,NODRAW;</p><p >IF(PDI>=MDI,0,DRAWNULL)COLORRED,CIRCLEDOT,LINETHICK2;</p><p >最新价:C,NODRAW;</p><p >市盈率:=IF(FINANCE(33)>0,DYNAINFO(39),0)*0.35;</p><p >每股收益:=IF(FINANCE(33)>0.01,FINANCE(33)*0.65,0);</p><p >参考定价:每股收益*市盈率*4,NODRAW;</p><p >负100买点:K>D AND K>REF(K,1) AND DIF>DEA AND DIF>REF(DIF,1)AND R6>50 AND R6>REF(R6,1)AND 买 AND 重心>REF(重心,1),COLORYELLOW,LINETHICK2;</p><p >{正100买点:K>D AND K>REF(K,1) AND DIF>DEA AND DIF>REF(DIF,1)AND R6>50 AND R6>REF(R6,1)AND 买2 AND 重心>REF(重心,1);};</p><p >M交叉临界:351/28*(EMA(DIF,9)-11/13*EMA(C,12)+25/27*EMA(C,26)),COLORLIBLUE,NODRAW;</p><p >K交叉点:(3*REF(D,1)-2*REF(K,1))/100*(HHV(H,9)-LLV(L,9))+LLV(L,9)COLORYELLOW,NODRAW;</p><p >长线持股:=K>D AND DIF>DEA AND R6>50 AND C>BBI ,COLORMAGENTA,DOTLINE;</p><p >IF(长线持股,J/2,DRAWNULL)COLORMAGENTA,LINETHICK5;</p><p >DRAWTEXT_FIX(1,0.01,0.92,0,STRCAT('想要好指标模型',CXHWZ3)),COLORWHITE;{此行可删除}</p><p ><b>效果图:</b></p><p class="ztext-empty-paragraph"><br/></p><p></p> 没看完~~~~~~ 先顶,好同志
页:
[1]