Saturday, September 25, 2010

Supertrend - pro real time formula (now free again)



Supertrend

L'indicatore supertrend di Oliver Seban (link)

Bisogna introdurre le varibabili aa (3) e bb (10). Tra parentesi i valori di default.



 
The indicator supertrend Oliver seban (link)

Necessary to introduce the variables aa (3) and bb (10). In parentheses, the default values​​.

avola=averagetruerange[bb](close)
avg=medianprice
up=avg+aa*avola
dn=avg-aa*avola
once trend=1
if close>up[1] then
trend=1
elsif close
trend=-1
endif
if trend<0 and trend[1]>0 then
flag=1
else
flag=0
endif
if trend>0 and trend[1]<0 then
flagh=1
else
flagh=0
endif
if trend>0 and dn
dn=dn[1]
endif
if trend<0 and up>up[1] then
up=up[1]
endif
if flag=1 then
up=avg+aa*avola
endif
if flagh=1 then
dn=avg-aa*avola
endif
if trend=1 then
super=dn
else
super=up
endif
return super
Any source

No comments:

Post a Comment