- 金币:
-
- 奖励:
-
- 热心:
-
- 注册时间:
- 2009-3-4
|
|
tr := sum(max(max(high-low,abs(high-ref(close,1))),abs(low-ref(close,1))),n);
hd := high-ref(high,1);
ld := ref(low,1)-low;
dmp:= sum(if(hd>0 and hd>ld,hd,0),14);
dmm:= sum(if(ld>0 and ld>hd,ld,0),14);
pdi:=dmp*100/tr;
mdi:=dmm*100/tr;
adx:=ma(abs(mdi-pdi)/(mdi+pdi)*100,6);
adxr:=(adx+ref(adx,m))/2;
lc := ref(close,1);
rsi:=sma(max(close-lc,0),4,1)/sma(abs(close-lc),4,1)*100;
zsp:=lc+18;
zdj:=llv(low,25);
enterlong:pdi>mdi and adx>20 and rsi<50;
exitlong:cross(close,zdj) or lc
n=14 m=6 |
|
|