通达信老鸭头指标公式源码
<p>以下是通达信老鸭头指标公式源码(无源码的请下载附件导入)</p>
<div class="con" id="rjsmad1"></div>
<p>V5:=MA(VOL,5);<br>
V10:=MA(VOL,10);<br>
V20:=MA(VOL,20);<br>
LDAY1:=BARSLAST(CROSS(V5,V10));<br>
LDAY2:=BARSLAST(CROSS(V5,V20));<br>
LDAY3:=BARSLAST(CROSS(V10,V20));<br>
LTJ1:=(LDAY1>LDAY2 OR LDAY1=LDAY2) {AND COUNT(CROSS(V5,V20),LDAY1)=1} AND LDAY2=0 AND V10<V20;<br>
LTJ2:=(C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2) AND C>REF(C,2));<br>
LTJ:=LTJ1 AND LTJ2;<br>
LTJ0:=LTJ1 AND V10>REF(V10,1);<br>
MA5:MA(C,5),COLORWHITE;<br>
MA10:MA(C,10),COLORCYAN;<br>
MA20:MA(C,20),COLORRED;<br>
MA40:MA(C,40),LINETHICK2,POINTDOT,COLORBLUE;<br>
MA60:MA(C,60),LINETHICK2,POINTDOT,COLORGREEN;<br>
PDAY1 := BARSLAST(CROSS(MA5,MA60));{5日均线上穿60日均线}<br>
PDAY2 := BARSLAST(CROSS(MA10,MA60));{10日均线上穿60日均线,至此形成鸭颈部}<br>
PDAY3 := BARSLAST(REF(HIGH=HHV(HIGH,PDAY2),1));{形成头部,要下跌}<br>
PDAY4 := BARSLAST(CROSS(MA10,MA5){ OR (REF(MA10,1)<REF(MA5,1) AND MA5=MA10)});{下跌后,5日均线和10日均线死叉}<br>
PDAY5 := BARSLAST(CROSS(MA5,MA10){ OR (REF(MA5,1)=REF(MA10,1) AND MA5>MA10)});{回落不久,5日均线和10日均线形成金叉,形成部}<br>
A1:= PDAY1>PDAY2 AND PDAY2>PDAY3 AND PDAY3>PDAY4 AND PDAY4>PDAY5 AND PDAY5<5;<br>
A2:= COUNT(CROSS(MA10,MA5),PDAY2)=1;<br>
A3:=MA5>MA60 AND MA10>MA60;<br>
{JT:=CROSS(MA20,MA60) AND C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2);<br>
CSFR:=CROSS(C,MA20) AND CROSS(C,MA40) AND CROSS(C,MA60);<br>
STICKLINE(JT,H,L,1,0),COLORYELLOW;<br>
STICKLINE(JT,O,C,8,0),COLORYELLOW;<br>
STICKLINE(CSFR,H,L,1,0),COLORWHITE;<br>
STICKLINE(CSFR,O,C,8,0),COLORWHITE;<br>
DRAWTEXT(CSFR,H,'出水芙蓉'),COLORYELLOW;<br>
DRAWTEXT(JT ,L, '价托'),COLORRED;}<br>
CSFR:=CROSS(C,MA20) AND CROSS(C,MA40) AND CROSS(C,MA60);<br>
YDAY1:=BARSLAST(CROSS(MA5,MA10));<br>
YDAY2:=BARSLAST(CROSS(MA5,MA20));<br>
YDAY3:=BARSLAST(CROSS(MA10,MA20));<br>
YJZZ:=(YDAY1=YDAY2 AND YDAY2=YDAY3 OR (YDAY1-YDAY2=1 OR YDAY2-YDAY3=1)) AND REF(MA5,2)<REF(MA10,2) AND REF(MA10,2)<REF(MA20,2) AND MA5>MA10 AND MA10>MA20 ;<br>
YJZZ1:=YDAY1=YDAY2 AND YDAY2=YDAY3 AND MA5>MA10 AND MA10>MA20 AND YDAY1=1;<br>
YJT:=YDAY1>=YDAY2 AND YDAY2=0 AND MA10<MA20;<br>
DAY1:=BARSLAST(CROSS(MA20,MA40));<br>
DAY2:=BARSLAST(CROSS(MA20,MA60));<br>
DAY3:=BARSLAST(CROSS(MA40,MA60));<br>
TJ0:=DAY1>=DAY2 AND DAY3<5;<br>
短顶:MA(REF(HHV(H,40),1),1);<br>
头顶:MA(REF(HHV(H,60),1),1);<br>
年顶:MA(REF(HHV(H,0),1),1),LINETHICK2,POINTDOT,COLORWHITE;<br>
JZZ:=DAY1=DAY2 AND DAY2=DAY3 AND REF(MA20,1)<REF(MA40,1) AND REF(MA40,1)<REF(MA60,1) AND MA20>MA40 AND MA40>MA60;<br>
TJ1:=DAY1>=DAY2 AND COUNT(CROSS(MA20,MA60),DAY1)=1{AND (DAY1-DAY2)<10};<br>
TJ2:=C>O AND CROSS(C,头顶);<br>
TJ21:=C>O AND CROSS(C,短顶);<br>
{TJ22:=C>O AND CROSS(C,年顶) AND VOL<V5;换手率小12%}<br>
TJ3:=VOL>REF(VOL,1);<br>
TJ4:=MA20>MA60 AND MA40>REF(MA40,1) AND MA40<MA60;<br>
TJ5:=DAY1>=DAY2 AND DAY2=0 AND MA40<MA60;<br>
{TJ:=(TJ2 AND TJ3) OR (TJ21 AND TJ3);}<br>
TJ:=DYNAINFO(4)>0<br>
AND HHV(HIGH,10)/LLV(LOW,10)<1.25<br>
AND REF(CLOSE,1)<(LLV(LOW,15)+(HHV(HIGH,15)-LLV(LOW,15))*0.85)<br>
AND CLOSE>OPEN<br>
AND CLOSE>=HHV(HIGH,10);<br>
STICKLINE(LTJ0,H,L,1,0),COLORGREEN;<br>
STICKLINE(LTJ0,O,C,8,0),COLORGREEN;<br>
STICKLINE(TJ,H,L,1,0),COLORYELLOW;<br>
STICKLINE(TJ,O,C,8,0),COLORYELLOW;<br>
{STICKLINE(TJ22,H,L,1,0),COLORYELLOW;<br>
STICKLINE(TJ22,O,C,8,0),COLORYELLOW;}<br>
STICKLINE(LTJ,H,L,1,0),COLORRED;<br>
STICKLINE(LTJ,O,C,8,0),COLORRED;<br>
STICKLINE(CSFR,H,L,1,0),COLORWHITE;<br>
STICKLINE(CSFR,O,C,8,0),COLORWHITE;<br>
DRAWTEXT(CSFR,H,'出水芙蓉'),COLORYELLOW;<br>
DRAWTEXT(TJ,L-0.2, '放量突破'),COLORRED;<br>
{DRAWTEXT(TJ22,H+0.2, '轻松过顶'),COLORWHITE;}<br>
DRAWTEXT(LTJ,H+0.5,'量托+多方炮'),COLORYELLOW;<br>
DRAWTEXT(LTJ0,H+0.5,'量托'),COLORYELLOW;<br>
DRAWTEXT(TJ5,MA60-0.2,'季价托'),COLORYELLOW;<br>
DRAWTEXT(YJT,MA20-0.5,'月价托'),COLORYELLOW;<br>
DRAWTEXT(JZZ,MA60-0.2,'金蜘蛛'),COLORYELLOW;<br>
DRAWTEXT(YJZZ OR YJZZ1,MA20-0.2,'月金蜘蛛'),COLORYELLOW;<br>
老鸭头:=(A1 AND A2 AND A3) AND FILTER(A1 AND A2 AND A3 ,5);<br>
DRAWTEXT(老鸭头,L,'老鸭头'),COLORGREEN;<br>
STICKLINE(老鸭头,H,L,0.5,0),COLORGREEN;<br>
STICKLINE(老鸭头,O,C,6,1),COLORGREEN,LINETHICK3;</p>
<p></p>
页:
[1]