ihzx 发表于 2021-8-22 15:46:39

东方财富趋势主图源码

<p>以下是东方财富趋势主图源码(无源码的请下载附件导入)</p>
<div class="con" id="rjsmad1"></div>
<p>东方财富趋势主图源码</p>
<p>趋势(主图)</p>
<p>W5:=COST(5);<br>
&nbsp;W10:=COST(10);{5-20反弹买入区}<br>
W50:=COST(50);{20-50整理区}<br>
W90:=COST(90);{50-80安全持股区}<br>
W99:=COST(99);{80-100主升风险卖出区}<br>
粘合度:=(W90-W10)/W10*100;<br>
&nbsp;HR:=HHV(HIGH,55);<br>
&nbsp;HRY:=LLV(LOW,55);<br>
&nbsp;HRY11:=HR*HRY;<br>
&nbsp;HRY33:SQRT(HRY11),COLORGREEN,LINETHICK1;<br>
&nbsp;IF(C&gt;HRY33 AND HRY33 &gt;=REF(HRY33 ,1), HRY33 ,DRAWNULL),LINETHICK1,COLORRED;<br>
&nbsp;H38:=HHV(HIGH,3);<br>
&nbsp;HR38:=LLV(LOW,3);<br>
&nbsp;HRY38:=H38*HR38;<br>
&nbsp;HRYZS5:SQRT(HRY38),COLOR00FF00,LINETHICK1;<br>
&nbsp;H13:=HHV(HIGH,8);<br>
&nbsp;HR13:=LLV(LOW,8);<br>
&nbsp;HRY13:=H13*HR13;<br>
&nbsp;HRYZS13:SQRT(HRY13),COLORFF0000,LINETHICK1;<br>
&nbsp;DRAWBAND(HRYZS5,RGB(200,50,55),HRYZS13,RGB(0,100,50));<br>
&nbsp;B:=EMA(C,2);<br>
&nbsp;S:=EMA(SLOPE(C,21)*20+C,42);<br>
&nbsp;BUY:=CROSS(B,S) AND C&lt;LLV(L,55)*1.193;<br>
&nbsp;SEL:=CROSS(S,B) AND C&gt;LLV(L,55)*1.3;<br>
&nbsp;DRAWICON(BUY,L*0.98,6);<br>
&nbsp;DRAWICON(SEL,H*1.03,7);<br>
&nbsp;GET:=ZIG(3,3);<br>
&nbsp;PL5:=ZIG(3,5);<br>
&nbsp;EN1:=ZIG(3,5)&gt;REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)&lt;=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)&lt;=REF(ZIG(3,5),3);<br>
&nbsp;EX1:=ZIG(3,5)&lt;REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)&gt;=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)&gt;=REF(ZIG(3,5),3);<br>
&nbsp;PL10:=ZIG(3,10);<br>
&nbsp;EN2:=ZIG(3,10)&gt;REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)&lt;=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)&lt;=REF(ZIG(3,10),3);<br>
&nbsp;EX2:=ZIG(3,10)&lt;REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)&gt;=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)&gt;=REF(ZIG(3,10),3);<br>
&nbsp;PL20:=ZIG(3,20);<br>
&nbsp;EN3:=ZIG(3,20)&gt;REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)&lt;=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)&lt;=REF(ZIG(3,20),3);<br>
&nbsp;EX3:=ZIG(3,20)&lt;REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)&gt;=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)&gt;=REF(ZIG(3,20),3);<br>
&nbsp;PL40:=ZIG(3,40);<br>
走强1:=BARSLAST(PL5&lt;REF(PL5,1));<br>
走弱1:=BARSLAST(PL5&gt;REF(PL5,1));<br>
走强2:=BARSLAST(PL10&lt;REF(PL10,1));<br>
走弱2:=BARSLAST(PL10&gt;REF(PL10,1));<br>
走强3:=BARSLAST(PL20&lt;REF(PL20,1));<br>
走弱3:=BARSLAST(PL20&gt;REF(PL20,1));<br>
&nbsp;ZTJZ5:=IF(PL10&gt;REF(PL10,1),COUNT(EN1,走强2),0);<br>
&nbsp;ZTJD5:=IF(PL10&gt;REF(PL10,1),COUNT(EX1,走强2),0);<br>
&nbsp;DTJZ5:=IF(PL10&lt;REF(PL10,1),COUNT(EN1,走弱2),0);<br>
&nbsp;DTJD5:=IF(PL10&lt;REF(PL10,1),COUNT(EX1,走弱2),0);<br>
&nbsp;ZTJZ10:=IF(PL20&gt;REF(PL20,1),COUNT(EN2,走强3),0);<br>
&nbsp;ZTJD10:=IF(PL20&gt;REF(PL20,1),COUNT(EX2,走强3),0);<br>
&nbsp;DTJZ10:=IF(PL20&lt;REF(PL20,1),COUNT(EN2,走弱3),0);<br>
&nbsp;DTJD10:=IF(PL20&lt;REF(PL20,1),COUNT(EX2,走弱3),0);<br>
&nbsp;DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'【A】'),COLOR00FFFF;<br>
&nbsp;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'【B】'),COLOR00FF00;<br>
&nbsp;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'【C】'),COLOR0000FF;<br>
&nbsp;DRAWTEXT(EX1 AND PL10&gt;REF(PL10,1) AND ZTJD5=1,H*1.02,'⑴'),COLORFF0000;<br>
&nbsp;DRAWTEXT(EN1 AND PL10&gt;REF(PL10,1) AND ZTJZ5=2,L*0.98,'⑵'),COLOR0000FF;<br>
&nbsp;DRAWTEXT(EX1 AND PL10&gt;REF(PL10,1) AND ZTJZ5=2,H*1.02,'⑶'),COLOR00FF00;<br>
&nbsp;DRAWTEXT(EN1 AND PL10&gt;REF(PL10,1) AND ZTJZ5=3,L*0.98,'⑷'),COLORFF00FF;<br>
&nbsp;DRAWTEXT(EX2 AND PL20&gt;REF(PL20,1) AND ZTJD10=1,H*1.02,'⑸'),COLOR00FF00;<br>
&nbsp;DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'〖Ⅰ〗'),COLORFF00FF;<br>
&nbsp;DRAWTEXT(EX2 AND DTJD10=2,H*1.05,'〖Ⅱ〗'),COLOR00FF00;<br>
&nbsp;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.93,'〖Ⅲ〗'),COLOR0000FF;<br>
&nbsp;DRAWTEXT(EX2 AND PL20&gt;REF(PL20,1) AND ZTJD10=1,H*1.03,'①'),LINETHICK3,COLORFFFF00;<br>
&nbsp;DRAWTEXT(EN2 AND PL20&gt;REF(PL20,1) AND ZTJZ10=2,L*0.95,'②'),LINETHICK3,COLOR00FFFF;<br>
&nbsp;DRAWTEXT(EX2 AND PL20&gt;REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2)<br>
&nbsp;AND EX2,H*1.03,'③'),LINETHICK3,COLOR00FF00;<br>
&nbsp;DRAWTEXT(EN2 AND PL20&gt;REF(PL20,1) AND ZTJZ10=3,L*0.95,'④'),LINETHICK3,COLOR00FFFF;<br>
&nbsp;P1:=5;<br>
&nbsp;P2:=10;<br>
&nbsp;P3:=20;<br>
&nbsp;P4:=30;<br>
&nbsp;P5:=60;<br>
&nbsp;P6:=120;<br>
&nbsp;P7:=240;<br>
&nbsp;P8:=340;<br>
&nbsp;N:=4;<br>
&nbsp;WX:=MA(CLOSE,0);<br>
&nbsp;M1:=MA(CLOSE,P1);<br>
&nbsp;M2:=(MA(CLOSE,P2) * IF((N &lt; 2),WX,1));<br>
&nbsp;M3:=(MA(CLOSE,P3) * IF((N &lt; 3),WX,1));<br>
&nbsp;M4:=(MA(CLOSE,P4) * IF((N &lt; 4),WX,1));<br>
&nbsp;M5:=(MA(CLOSE,P5) * IF((N &lt; 5),WX,1));<br>
&nbsp;M6:=(MA(CLOSE,P6) * IF((N &lt; 6),WX,1));<br>
&nbsp;M7:=(MA(CLOSE,P7) * IF((N &lt; 7),WX,1));<br>
&nbsp;M8:=(MA(CLOSE,P8) * IF((N &lt; 8),WX,1));<br>
&nbsp;C1:=REF(CLOSE,1);<br>
&nbsp;C2:=HHV(C1,2);<br>
&nbsp;C3:=LLV(C1,1);<br>
&nbsp;ET:=HHV(C1,2);<br>
&nbsp;ET1:=REF(ET,1);<br>
&nbsp;XB:=LLV(C1,1);<br>
&nbsp;XB1:=REF(XB,1);<br>
&nbsp;M:=BARSLAST(((CLOSE &lt; XB) AND (C1 &gt;= XB1)));<br>
&nbsp;M11:=REF(M,1);<br>
&nbsp;N9:=BARSLAST(((CLOSE &gt; ET) AND (C1 &lt;= ET1)));<br>
&nbsp;N1:=REF(N9,1);<br>
&nbsp;M21:=(BARSLAST((((M - N9) &gt; 0) AND (M11 &lt;= N1))) + 1);<br>
&nbsp;N2:=(BARSLAST((((N9 - M) &gt; 0) AND (N1 &lt;= M11))) + 1);<br>
&nbsp;ET2:=HHV(ET,M21);<br>
&nbsp;XB2:=LLV(XB,N2);<br>
&nbsp;A:=IF((((M - N9) &gt; 0) AND (M11 &lt;= N1)),1,IF((((N9 - M) &gt; 0) AND (N1 &lt;= M11)),0,2));<br>
&nbsp;H1:=IF(((M - N9) &gt; 0),CLOSE,ET2);<br>
&nbsp;H2:=IF((A = 1),CLOSE,C2);<br>
&nbsp;H3:=IF(((M - N9) &lt; 0),CLOSE,XB2);<br>
&nbsp;H4:=IF((A = 1),CLOSE,XB2);<br>
&nbsp;H5:=IF((((M - N9) &gt; 0) OR (A = 1)),CLOSE,H3);<br>
&nbsp;H6:=REF(H5,1);<br>
&nbsp;H7:=REF(H5,2);<br>
&nbsp;H8:=(H5 &gt; H6);<br>
&nbsp;H9:=(((H4 = REF(H4,1)) AND (REF(H4,1) &lt; REF(H4,2))) AND (H5 &gt; REF(H5,2)));<br>
&nbsp;H10:=(((H2 = REF(H2,1)) AND (H4 = REF(H4,1))) AND (H5 = REF(H5,2)));<br>
&nbsp;W:=((H8 OR H9) OR H10);<br>
&nbsp;T9:=((H5 &lt; H6) AND (H5 &lt; REF(H5,2)));<br>
&nbsp;T10:=((H4 = REF(H4,1)) AND (H5 &lt; REF(H5,2)));<br>
&nbsp;T11:=((H3 &gt; REF(H3,1)) AND (H5 &lt; REF(H5,1)));<br>
&nbsp;T12:=((H5 = REF(H5,1)) AND (H3 = H4));<br>
&nbsp;T13:=((H2 = REF(H2,1)) AND (H2 = H5));<br>
&nbsp;TW:=((((T9 OR T10) OR T11) OR T12) OR T13);<br>
&nbsp;PK:=((AMOUNT * (((OPEN + CLOSE) + HIGH) + LOW)) / 4);<br>
&nbsp;PK1:=IF((VOL &gt; 0),(PK / AMOUNT),((((OPEN + CLOSE) + HIGH) + LOW) / 4));<br>
&nbsp;BBP:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);<br>
&nbsp;DRAWTEXT((ISLASTBAR AND (BBP &gt;= 96.5)),(H5 * 1.033),'明见短高,龙头除外'),COLOR00FF00;<br>
&nbsp;DRAWTEXT((ISLASTBAR AND (BBP &lt; 1)),((H5 + H4) / 1.96),'明见短低,跌停除外'),COLOR0000FF;<br>
&nbsp;DRAWTEXT(((ISLASTBAR AND W) AND (BBP &lt; 96.5)),(H5 * 1.033),'看涨'),COLOR0015FF;<br>
&nbsp;DRAWTEXT(((ISLASTBAR AND TW) AND (BBP &gt; 1)),((H5 + H4) / 2),'看跌'),COLOR00FF00;<br>
&nbsp;DM:=CROSS((4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)<br>
&nbsp;-3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1)),8);<br>
&nbsp;DRAWTEXT(DM,L*0.98,'★上轿!'),COLORBROWN;<br>
&nbsp;CBFB:=COSTEX(C,REF(C,1));<br>
&nbsp;JL:=IF(C&gt;CBFB,V,0);<br>
&nbsp;CL:=IF(C&lt;CBFB,V,0);<br>
&nbsp;JLH:=SUM(JL,4);<br>
&nbsp;CLH:=SUM(CL,4);<br>
&nbsp;LHB:=CLH/JLH;<br>
&nbsp;TJ16:=IF(HHV(LHB,5)&gt;4 AND CROSS(2,LHB) AND C&gt;=O,1,0);<br>
&nbsp;DRAWICON(TJ16,L*0.96,9);<br>
&nbsp;JLHS:=SUM(JL,4);<br>
&nbsp;CLHS:=SUM(CL,4);<br>
&nbsp;LHS:=JLHS/CLHS;<br>
&nbsp;TJS1:=IF(HHV(LHS,5)&gt;4 AND CROSS(2,LHS) AND C&lt;O,1,0);<br>
&nbsp;DRAWICON(TJS1,H*1.0096,19);</p>
<p></p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 东方财富趋势主图源码