ionone wrote: Sun Sep 05, 2021 4:22 pm
what's the error please
After compiling there were 7 errors
//Filter on amplitude based on ATR and filter
//on wave period based on the tau factor.
//This filter should disregard all the waves
//with a period of less than tau
once v=0
once b=1
once input=medianprice
if barindex>15 then
a=averagetruerange[periodo](close)
tau=periodofiltro/3.5
if (abs(MedianPrice-v[1]))<=(a) then
input=input[1]
b=b[1]+1
else
input=MedianPrice-v[1]
b=1
endif
v=v[1]+(Input*(1-exp(-b/tau)))
endif
if v>=v[1] then
r=0
g=0
b=255
else
r=255
g=0
b=0
endif
return v coloured (r,g,b), close as "close"