指标源码<br> -----------------------<br> MA5:MA(CLOSE,5);<br> MA10:MA(CLOSE,10);<br> MA20:MA(CLOSE,20);<br> MA30:MA(CLOSE,30);<br> MA63:MA(CLOSE,63);<br> V5MA5-REF(MA5,1))/(REF(MA5,1)-REF(MA5,2)),NODRAW;<br> V10MA10-REF(MA10,1))/(REF(MA10,1)-REF(MA10,2)),NODRAW;<br> BU:=CROSS(HIGH,SAR(3,1,20));<br> SEL:=CROSS(SAR(3,1,20),LOW);<br> 双:=(MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND MA20>REF(MA20,1) AND MA30>REF(MA30,1) AND MA63>REF(MA63,1) AND REF(MA5,1)<REF(MA5,2) AND REF(MA10,1)<REF(MA10,2));<br> 单:=(MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND MA20>REF(MA20,1) AND MA30>REF(MA30,1) AND MA63>REF(MA63,1) AND REF(MA5,1)<REF(MA5,2) AND REF(MA10,1)>REF(MA10,2));<br> 多:=(MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND MA20>REF(MA20,1) AND MA30>REF(MA30,1) AND MA63>REF(MA63,1)) AND (REF(MA5,1)<=REF(MA5,2) OR REF(MA10,1)<=REF(MA10,2) OR REF(MA20,1)<=REF(MA20,2) OR REF(MA30,1)<=REF(MA30,2) OR REF(MA63,1)<=REF(MA63,2));<br> RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;<br> K:=SMA(RSV,N2,1);<br> D:=SMA(K,N3,1);<br> J:=3*K-2*D;<br> 金:=CROSS (J,D);<br> DRAWTEXT(BU,LOW*0.98,'B'),COLORYELLOW,LINETHICK2;<br> DRAWTEXT(SEL,1.01*HIGH,'S'),COLORGREEN,LINETHICK2;<br> DRAWTEXT(双,LOW*0.96,'双'),COLORGREEN,LINETHICK2;<br> DRAWTEXT(单,LOW*0.96,'单'),COLORGREEN,LINETHICK2;<br> DRAWTEXT(多,LOW*0.93,'多'),COLORGREEN,LINETHICK2;<br> DRAWICON(金,LOW*0.91,1),COLORRED,LINETHICK2;<br><br> =============================================<br> 用法:<br> 1、功能=>公式系统=>公式管理器<br> 2、双击选择第一项=>均线<br> 3、修改公式名称例如为=>我的均线,把以上代码替换源代码,另存为即可。<br> 4、右键单击任意K线图,会弹出窗口<br> 5、选择=>主图指标=>选择主图指标<br> 6、选择另存为的=我的均线,即可。<br> 7、一般来说,当K线图下方出现“单”或“双”和“B”“多”“红箭头”同时出现的时候,一般为上升趋势的拐点。 |