Citazione Originariamente Scritto da Cagalli Tiziano Visualizza Messaggio
In effetti c'è una differenza...hai il codice della T3?
Dovrebbe essere questo


multiplier=3
period=10


moy=averagetruerange[period](close)
price=medianprice
up=price+multiplier*moy
dn=price-multiplier*moy
once trend=1
if close>up[1] then
trend=1
elsif close<dn[1] then
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[1] then
dn=dn[1]
endif
if trend<0 and up>up[1] then
up=up[1]
endif
if flag=1 then
up=price+multiplier*moy
endif
if flagh=1 then
dn=price-multiplier*moy
endif
if trend=1 then
mysupertrend=dn
else
mysupertrend=up
endif


return mysupertrend coloured by (trend) as "SuperTrend"