ihzx 发表于 2021-8-21 12:51:39

dmi优化(飞狐)

<p>ATRA := SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),6,1);<br />
HD := HIGH-REF(HIGH,1);<br />
LD := REF(LOW,1)-LOW;<br />
DMP:= SMA(IF(HD&gt;0 AND HD&gt;LD,HD,0),6,1);<br />
DMM:= SMA(IF(LD&gt;0 AND LD&gt;HD,LD,0),6,1);<br />
PDI:= DMP*100/ATRA;<br />
MDI:= DMM*100/ATRA;<br />
ADX: SMA(ABS(MDI-PDI)/(MDI+PDI)*100,6,1),LINETHICK2;<br />
涨趋势:FILLRGN((MDI-PDI)/(MDI+PDI)&lt;0,10,ADX),COLOR8899DD;<br />
跌趋势:FILLRGN((MDI-PDI)/(MDI+PDI)&gt;=0,10,ADX),COLORDD9988;<br />
对比线:=(ADX+REF(ADX,6))/2;<br />
STICKLINE(交叉函数(ADX,30),ADX,30,10,0),Color00FFFF,LINETHICK5;<br />
80,ColorFFFFFF,LINEDOT;<br />
50,LINEDOT;<br />
20,LINEDOT;<br />
ww1:=SMA(((CLOSE-LLV(CLOSE,10))/(HHV(HIGH,10)-LLV(LOW,10))),3,1);<br />
ww2:=SMA(((ww1-LLV(ww1,3))/(HHV(ww1,3)-LLV(ww1,3))),3,1)*100;<br />
zz:=SMA(((VOL-LLV(VOL,10))/(HHV(VOL,10)-LLV(VOL,10))),3,1);<br />
zz1:=SMA(((zz-LLV(zz,3))/(HHV(zz,3)-LLV(zz,3))),3,1)*100;<br />
快线:=EMA(ww2,1),COLORBLUE,LINETHICK2;<br />
慢线:=EMA(快线,2),COLORGREEN,LINETHICK2;<br />
量快:=EMA(zz1,1)COLORWHITE,LINETHICK2;<br />
量慢:=EMA(量快,2),COLORWHITE,LINETHICK2;<br />
AA1:=移动平均(((收盘价-最低值(收盘价,13))/(最高值(最高价,13)-最低值(最低价,13))),3,1);<br />
价线:=移动平均(((AA1-最低值(AA1,4))/(最高值(AA1,4)-最低值(AA1,4))),3,1)*100;<br />
周线:MA(价线,5),COLORMAGENTA,LINETHICK0;<br />
BB1:=移动平均(((vol-最低值(vol,13))/(最高值(vol,13)-最低值(vol,13))),3,1);<br />
量线:=移动平均(((BB1-最低值(BB1,4))/(最高值(BB1,4)-最低值(BB1,4))),3,1)*100;<br />
周量:MA(量线,5),COLORyellow,LINETHICK0;<br />
月线:=MA(价线,22),COLORRED,LINEDOT,LINETHICK0;<br />
月量:=MA(量线,22),COLORyellow,LINEDOT,LINETHICK0;<br />
快线2:=EMA(周线,1),COLORBLUE,LINETHICK2;<br />
慢线2:=EMA(快线2,2),COLORGREEN,LINETHICK2;<br />
量快2:=EMA(周量,1)LINEDOT;<br />
量慢2:=EMA(量快2,2),COLORWHITE,LINETHICK2;<br />
DRAWICON(CROSS(快线2,慢线2),慢线2,10);<br />
DRAWICON(CROSS(慢线2,快线2),快线2,11);<br />
DRAWICON(CROSS(量快2,量慢2),量慢2,10);<br />
DRAWICON(CROSS(量慢2,量快2),量快2,11);<br />
PARTLINE(周线&gt;=REF(周线,1),周线),COLORMAGENTA,LINEDOT,LINETHICK2;<br />
PARTLINE(周线&gt;=REF(周线,1) AND 月线&gt;=REF(月线,1),周线),COLORRED,LINEDOT,LINETHICK2;<br />
PARTLINE(周线&lt;REF(周线,1),周线),COLORgreen,LINEDOT,LINETHICK1;<br />
PARTLINE(周量&gt;=REF(周量,1),周量),COLORyellow,LINEDOT,LINETHICK2;<br />
PARTLINE(周量&lt;REF(周量,1),周量),COLORgreen,LINEDOT,LINETHICK1;<br />
DRAWTEXT(FILTER(快线&gt;=95 AND 慢线&gt;=95 AND周线&gt;=90OR 周量&gt;=90,5),85,'减'),COLORWHITE,LINETHICK2;<br />
看色块&rarr;:FILLRGN(1,30,31),COLORRED;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: dmi优化(飞狐)