This is an upgrade to the HMA-Kahlman Trend & Trendlines script (tradingview.com/script/Pi7EVefr-hma-kahlman-trend-trendlines/). This version gives more flexibility because you can play around with 2 parameters to Kalman function (Sharpness and K (aka. step size)).