It is good to see this indicator behaves like a Kalman filter, however, it can be simplified to a sum of two Exponential Moving Averages of the price and the difference between price and its previous value, thus maybe it is not an authentic Kalman filter:
delta=price-kf[1]
kf=EMA(price,T)+EMA(delta,T)
where T=100 in the posted pine script :)
pjfj
⋅
I know the rest of the CC's but velo can someone please enlighten me, thanks
alexgrover
⋅
@pjfj, Velo is bandpass filter that is summed to kf, it allow to reduce the lag of the final output. It is useful to see it like the slope of the double exponential smoothing filter.
cookityammy
⋅
converted to pine-version 3:
//@version=3
study("Kalman Smoother",overlay=true)
Gain = input(200,type=float)
// changes for conversion from pine-v2 to v3
kf=0.0
velo=0.0
delta=price-kf[1]
kf=EMA(price,T)+EMA(delta,T)
where T=100 in the posted pine script :)