hans 41 schreef:
[quote=GanzenFlapper op de Ark Noach]
Weet niet meer wie maar iemand vroeg om de RSI van Brown ben nu klaar met testen hieronder volgt de codering. Werkt op iedere frame kwartier uur en dag pas zich zelf aan code is getest staat nu ook op het ChartNet forum:
De code begint na deze regel:
Geschreven door Tom Noach
d.d. 16 maart 2010
pr=medianprice
once l0=pr
once l1=pr
once l2=pr
once l3=pr
once rsil=undefined
if barindex>0 then
l0=(1-gamma)*pr+gamma*l0[1]
l1=-gamma*l0+l0[1]+gamma*l1[1]
l2=-gamma*l1+l1[1]+gamma*l2[1]
l3=-gamma*l2+l2[1]+gamma*l3[1]
cu=0
cd=0
if l0>=l1 then
cu=l0-l1
else
cd=l1-l0
endif
if l1>=l2 then
cu=cu+l1-l2
else
cd=cd+l2-l1
endif
if l2>=l3 then
cu=cu+l2-l3
else
cd=cd+l3-l2
endif
rsil=cu/(cu+cd)
endif
Top= 0.77
Bot=0.33
if de48=de48[1] and de48[1]=de48[2] and de48[2]<>de48[3] then
flag=barindex+8
flag1=1
endif
mp=MedianPrice
blue=WilderAverage[13](mp)
red=WilderAverage[8](mp)
green=WilderAverage[5](mp)
k=10
n=(k*2)-4
p=(n/2)-1
h1=DPO[n](high)
moyh=high-h1
hi=(moyh-moyh[1]+(high[p])/n)*n
hi=(round(hi*100))/100
l1=dpo[n](low)
moyl=low-l1
lo=(moyl-moyl[1]+(low[p])/n)*n
lo=(round(lo*100))/100
if low[1]>low and low[2]>low and lo[7]>low and lo[8]>low and (barindex<flag or flag1=0) then
frac=low-(AverageTrueRange[14](close))*.5
else
frac=blue[8]
endif
if high>high[1] and high>high[2] and high>hi[8] and high>hi[7] and (barindex<flag or flag1=0) then
frac1=high+(averagetruerange[14](close))*.5
else
frac1=blue[8]
endif
Mb=Average[Xp](typicalprice)
K=48
N=(k*2)-4
P=(n/2)-1
H1=DPO[n](high)
Moyh=high-h1
hi=(moyh-moyh[1]+(high[p])/n)*n
hi=(round(hi*100))/100
l1=dpo[n](low)
moyl=low-l1
lo=(moyl-moyl[1]+(low[p])/n)*n
lo=(round(lo*100))/100
clo1=dpo[n](close)
moyc=close-clo1
clot=(moyc-moyc[1]+(close[p])/n)*n
clot=(round(clot*100))/100
cond1=(high>high[1] and high>high[2])
cond2=(cond1 and high>hi[46]) and (barindex>bari or rr=-1)
if cond1 and cond2 then
flagg=1
targeth=high
targetl=lo[46]
else
flagg=0
signa=mb
endif
for zz=0 to 45
if clot[45-zz]<targetl and hi[45-zz]<=targeth and flagg=1 then
signa=high+(averagetruerange[20](close))*.5
rr=1
bari=barindex+zz+2
break
elsif hi[45-zz]>targeth then
signa=mb
break
endif
next
condi=(low<low[1] and low<low[2]) and low<lo[46] and (barindex>bar or rr=1)
if condi then
fflag=1
target1=low
target2=hi[46]
else
fflag=0
siigna=mb
endif
for kk=0 to 45
if clot[45-kk]>target2 and lo[45-kk]>=target1 and fflag=1 then
siigna=low-(averagetruerange[20](close))*.5
rr=-1
bar=barindex+kk+2
break
elsif lo[45-kk]<target1 then
siigna=mb
break
endif
next
if barindex < 100 then
signa=undefined
siigna=undefined
endif
return rsil,Top as "Top", Bot as "Bottom"
[/quote]
Hartelijk dank dat was ik, Hans 41