ihzx 发表于 2021-8-21 12:52:33

乘风趋势主图(飞狐)

<p>乘风趋势主图执行的是趋势为王,只做多头的理念。均线采用我习惯的5、13、21、34、55参数,以MA34作为多空判断线,信号点采用了我发过的 KDJ介入为基础,并以多空线来定义抄底、回抽、确认、加仓等介入信号,卖出信号则以RSI作为参考提示,主图并叠加了MACD柱子。</p>
<p><br />
CCC:=IF(CAPITAL&gt;0,AMOUNT/VOL/100,C);<br />
底线:10*(HHV(HIGH,13)-LLV(LOW,13))/100+LLV(LOW,13),COLORffabcd,LINETHICK0;<br />
m55:MA(CLOSE,55),colorFF0080,LINETHICK0;<br />
m34:MA(CLOSE,34),color0000ff,LINETHICK0;<br />
m21:MA(CLOSE,21),color00FFff,LINETHICK0;<br />
m13:MA(CLOSE,13),colorffFFFF,LINETHICK0;<br />
m5:ma(c,5),colorff00ff,LINETHICK0;</p>
<p><br />
FILLRGN(c,底线,llv(l,13)),color004000;</p>
<p>tjaa:=BARSLAST(ref(cross(&quot;RSI.RSI1&quot;,22) and c&gt;o,1));<br />
R准备:=l&lt;ref(o,tjaa+1) and &quot;RSI.RSI1&quot;&gt;22 and &quot;RSI.RSI1&quot;&lt;ref(&quot;RSI.RSI1&quot;,1) and BARSLAST(cross(&quot;RSI.RSI1&quot;,22)and c&gt;o)+1&gt;5 and BARSLAST(cross(&quot;RSI.RSI1&quot;,22)and c&gt;o)+1&lt;25;<br />
tja1:=BARSLAST(ref(cross(&quot;KDJ.J&quot;,0),1));<br />
J准备:=l&lt;ref(o,tja1+1) and &quot;KDJ.J&quot;&gt;0 and &quot;KDJ.J&quot;&lt;ref(&quot;KDJ.J&quot;,1) and BARSLAST(cross(&quot;KDJ.J&quot;,0))+1&gt;5 and BARSLAST(cross(&quot;KDJ.J&quot;,0))+1&lt;10;<br />
STICKLINE(R准备 AND J准备,(0.93*SYSPARAM(5)),(0.93*SYSPARAM(5))*1.03,30,0),colorFF0080;<br />
R卖1:=&quot;RSI.RSI1&quot;&gt;80 and &quot;RSI.RSI2&quot;&lt;80;<br />
R卖2:=&quot;RSI.RSI1&quot;&gt;85 and &quot;RSI.RSI2&quot;&gt;80;<br />
STICKLINE(&quot;RSI.RSI1&quot;&gt;80,h*1.01,l*0.99,10,0),color555555;<br />
STICKLINE(R卖1,h*1.01,l*0.99,10,0),color00ff00;<br />
STICKLINE(R卖2,h*1.01,l*0.99,10,0),colorff0000;</p>
<p><br />
PARTLINE(c,m34),Colorred,LINETHICK2,PRECISION2;<br />
PARTLINE(m34&lt;ref(m34,1),m34),Colorfff333,LINETHICK2,PRECISION2;<br />
底线,COLORffabcd,LINETHICK1;</p>
<p><br />
{空心红}<br />
STICKLINE(C,H,L,1,0),COLORff0000;<br />
STICKLINE(C,C,O,8,0),COLORff0000;<br />
STICKLINE(C&gt;o,C,O,8,1),COLORff0000;<br />
STICKLINE(C&gt;O and (m34&gt;=ref(m34,1) or ccc&gt;m34),H,L,1,0),COLORRED;<br />
STICKLINE(C&gt;O and (m34&gt;=ref(m34,1) or ccc&gt;m34),C,O,8,1),COLORRED;<br />
STICKLINE(C&lt;=O and (m34&gt;=ref(m34,1) or ccc&gt;m34),H,L,1,0),COLORCYAN;<br />
STICKLINE(C&lt;=O and (m34&gt;=ref(m34,1) or ccc&gt;m34),C,O,8,1),COLORCYAN;<br />
STICKLINE(C&gt;O and (m34&gt;=ref(m34,1) or ccc&gt;m34) AND C&gt;=M13,H,L,1,0),COLORFFC0DD;<br />
STICKLINE(C&gt;O and (m34&gt;=ref(m34,1) or ccc&gt;m34) AND C&gt;=M13,C,O,8,0),COLORFFC0DD;<br />
STICKLINE(C&lt;=O and (m34&gt;=ref(m34,1) or ccc&gt;m34) AND C&gt;=M13,H,L,1,0),COLORDDDDDD;<br />
STICKLINE(C&lt;=O and (m34&gt;=ref(m34,1) or ccc&gt;m34) AND C&gt;=M13,C,O,8,1),COLORDDDDDD;<br />
STICKLINE(L&lt;ma(c,34) and (m34&gt;=ref(m34,1) or ccc&gt;m34) AND ma(c,21)&gt;ref(ma(c,21),1) and ma(c,21)&gt;ma(c,34),C,O,8,0),COLOR00FFFF;<br />
STICKLINE(L&lt;ma(c,34) and(m34&gt;=ref(m34,1) or ccc&gt;m34) AND ma(c,21)&gt;ref(ma(c,21),1) and ma(c,21)&gt;ma(c,34) AND C&lt;O,C,O,8,1),COLOR00FFFF;</p>
<p><br />
PARTLINE(m34&gt;m55,m55),colorff0080;</p>
<p>PARTLINE(m21&gt;=m34 and m21&lt;REF(m21,1) ,m21),COLOR33FF33,LINETHICK1,PRECISION2;<br />
PARTLINE(m21&gt;=m34 and m21&gt;=REF(m21,1),m21),COLOR00ffff,LINETHICK1,PRECISION2;<br />
PARTLINE(m21&lt;m34 and m21&lt;REF(m21,1),m21),COLOR33FF33,LINETHICK1,LINEDOT;<br />
PARTLINE(m21&lt;m34 and m21&gt;=REF(m21,1),m21),COLOR00ffff,LINETHICK1,LINEDOT;</p>
<p><br />
PARTLINE(m13&gt;=m34 and m13&gt;=ref(m13,1),m13),Colorffffff,LINETHICK1,PRECISION2;<br />
PARTLINE(m13&gt;=m34 and m13&lt;ref(m13,1),m13),COLORff5959,LINETHICK1;<br />
PARTLINE(m13&lt;m34 and m13&gt;=ref(m13,1),m13),Colorffffff,LINETHICK1,LINEDOT;<br />
PARTLINE(m13&lt;m34 and m13&lt;ref(m13,1),m13),COLORff5959,LINETHICK1,LINEDOT;</p>
<p>PARTLINE(m5&gt;=m34 and m5&gt;=ref(m5,1),m5),COLORff00ff,PRECISION2,LINETHICK1;<br />
PARTLINE(m5&gt;=m34 and m5&lt;ref(m5,1),m5),COLORCYAN,LINETHICK1;<br />
PARTLINE(m5&lt;m34 and m5&gt;=ref(m5,1),m5),COLORff00ff,LINEDOT,LINETHICK1;<br />
PARTLINE(m5&lt;m34 and m5&lt;ref(m5,1),m5),COLORCYAN,LINETHICK1,LINEDOT;</p>
<p><br />
抄底:=REF(COUNT(&quot;KDJ.K&quot;&lt;ref(&quot;KDJ.K&quot;,1),5)&gt;=5,1) AND COUNT(&quot;KDJ.K&quot;&lt;30,5)&gt;=2AND COUNT(&quot;KDJ.J&quot;&lt;0,3)&gt;0 AND CROSS(&quot;KDJ.J&quot;,0);<br />
DRAWTEXT(抄底 and not((ccc&gt;m34 or m34&gt;ref(m34,1))),l*0.98,'抄\n底'),COLOR00ffff,ALIGN;<br />
DRAWTEXT(抄底 and (ccc&gt;m34 or m34&gt;ref(m34,1)),l*0.98,'确\n认'),COLORred,ALIGN;<br />
tj00:=BARSLAST(ref(cross(&quot;KDJ.K&quot;,&quot;KDJ.D&quot;) and ref(&quot;KDJ.K&quot;,1)&lt;35,1));<br />
加仓:=c&lt;ref(c,tj00+1)*1.1 and ref(&quot;KDJ.K&quot;,1)&lt;60and (tj00+1)&lt;25   and (tj00+1)&gt;5and&quot;KDJ.K&quot;&gt;ref(&quot;KDJ.K&quot;,tj00+1) and cross(&quot;KDJ.K&quot;,&quot;KDJ.D&quot;);<br />
DRAWTEXT(加仓 and not((ccc&gt;m34 or m34&gt;ref(m34,1))),l*0.98,'回\n抽'),COLOR5599ff,ALIGN;<br />
DRAWTEXT(加仓 and (ccc&gt;m34 or m34&gt;ref(m34,1)),l*0.98,'加\n仓'),COLORff00ff,ALIGN;<br />
DRAWICON(CROSS(&quot;KDJ.J&quot;,0) and (ccc&gt;m34 or m34&gt;ref(m34,1)),l*0.97,8),ALIGN;</p>
<p>{主图MACD}<br />
DIFFZ:=EMA((EMA(CLOSE,12)-EMA(CLOSE,26)),1);<br />
DEAZ:=EMA(DIFFZ,9),COLOR00AA88;<br />
MACDZ:=3*(DIFFZ-DEAZ);<br />
STICKLINE(MACDZ&gt;0 AND MACDZ&gt;REF(MACDZ,1),(0.93*SYSPARAM(5)),MACDZ+(0.93*SYSPARAM(5)),8,0),COLORFF00FF;<br />
STICKLINE(MACDZ&gt;0 AND MACDZ&lt;=REF(MACDZ,1),(0.93*SYSPARAM(5)),MACDZ+(0.93*SYSPARAM(5)),8,1),COLORFF00FF;<br />
STICKLINE(MACDZ&lt;0 AND MACDZ&gt;REF(MACDZ,1),(0.93*SYSPARAM(5)),MACDZ+(0.93*SYSPARAM(5)),8,1),COLORDDDDDD;<br />
STICKLINE(MACDZ&lt;0 AND MACDZ&lt;=REF(MACDZ,1),(0.93*SYSPARAM(5)),MACDZ+(0.93*SYSPARAM(5)),8,0),COLORDDDDDD;<br />
PARTLINE(MACDZ&gt;0 AND DIFFZ&gt;0,(0.9*SYSPARAM(5))),CROSSDOT,COLOR0000FF,LINETHICK1;<br />
PARTLINE(MACDZ&lt;=0 AND DIFFZ&gt;0,(0.9*SYSPARAM(5))),CROSSDOT,COLOR00FFFF,LINETHICK1;<br />
PARTLINE(MACDZ&gt;0 AND DIFFZ&lt;=0,(0.9*SYSPARAM(5))),CROSSDOT,COLORFF55DD,LINETHICK1;<br />
PARTLINE(MACDZ&lt;=0 AND DIFFZ&lt;=0,(0.9*SYSPARAM(5))),CROSSDOT,COLOR66DD66,LINETHICK1;</p>
<p><br />
<img width="940" height="460" border="0" src="https://www.gupang.com/uploads/allimg/100112/1_100112163606_2.jpg" alt="" style="cursor: pointer;" onclick="window.open('https://www.gupang.com/uploads/allimg/100112/1_100112163606_2.jpg')" /><br />
<img width="882" height="432" border="0" src="https://www.gupang.com/uploads/allimg/100112/1_100112163606_3.jpg" alt="" style="cursor: pointer;" onclick="window.open('https://www.gupang.com/uploads/allimg/100112/1_100112163606_3.jpg')" /><br />
<img width="916" height="434" border="0" src="https://www.gupang.com/uploads/allimg/100112/1_100112163606_4.jpg" alt="" style="cursor: pointer;" onclick="window.open('https://www.gupang.com/uploads/allimg/100112/1_100112163606_4.jpg')" /></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 乘风趋势主图(飞狐)