OPEN-SOURCE SCRIPT
Universal Adaptive Tracking

🙏🏻 Behold, this is UAT (Universal Adaptive Tracker), with less words imma proceed how it compares with alternatives:

^^ comparison with non-adaptive quadratic regression (purple line), that has higher overshoots, less precision

^^ comparison with JMA and its adaptive gain. JMA’s gain is heavily limited, while UAT’s negative and positive gains are soft-saturated with p-order Möbius transform
This drop is inspired by, dedicated to, and made will all love towards Jurik Research, who retired in October 2k21. When some1 steps out, some1 has to step in, and that time it’s me (again xd). But there’s some history u gotta know:
Some history u gotta know:
In ~2008 dudes from forexfactory reverse engineered Jurik Moving Average
In late 1990s dudes from Jurik Research approximated the best possible adaptive tracking filter for evolution of prices via engineering miracles
Today in 2k26, me I'm gonna present to you the real mathematical objects/entities behind JMA top-edge engineered approximates. You will prolly be even more happy now then all the dem together back then.
Why all this?
When we talk about object tracking stuff, e.g. air defense, drones, missiles, projectiles, prices, etc, it all comes down to adaptive control and (Position & Velocity & Acceleration) aka PVA state space models (the real stuff many of you count as DSP).
Why? Cuz while position (P) : (mean), or position & velocity (PV) : (linear regression) are stable enough in dem own ways, Position & Velocity & Acceleration (PVA) : (quadratic regression+) require adaptivity do be stable. And real world stuff needs PVA, due to non-linearity for starters.
So that’s why. If your goal is Really smoothing and no lag, u gotta go there. I see a lot of folks are crazy with it and want it, so here is it, for y’all. And good news, this is perfect for your favorite Moving Windows.
How to use it
The upper study:
The lower study:

^^ Upper study with expected typical and maximum volatility bands turned On
...
The method explained
What you got in the end is non-linear, adaptive, lighting fast when needed and slow when required price tracking. All built upon real math entities/objects, not a brilliantly engineered approximation of them. No parameters to optimize, data tells it all.
... It all starts from a process model, in our cause this is...
MFPM (Mechanical Feedback Price Model)
Doesn’t make gaussian assumptions like most quant mainstream tech, accepts that innovations are Laplace “at best”, relies in L inf and L0 spaces.
I created this model neither trynna fit non-fitting ARMA / variants, nor trynna be silly assuming that price state evolution and markets are random.
Theory behind it: if no new volume comes, then price evolution would be simply guided by the feedback based on previous trading activity, pushing prices towards the midrange between 2 latest datapoints, being the main force behind so called “pullbacks” and reason why most pullbacks end just a bit past 50% of a move.
This is the Real mechanical feedback based mean reversion, that is always there in the markets no matter what, think of it as a background process that is always there, and fresh new volume deviates prices away from it. Btw, this can also be expressed as AR2 with both phis = 0.5.
Then I separate positive and negative innovations from this model and process them separately, reflecting the asymmetry between buy and sell forces, smth that most forget. Both of these follow exponential distribution. Each stream has its own memory so here we use recursive operators. We track maximum innovations (differences between real and expected datapoints) with exponentially decaying damping factor, and keep tracking typical innovation, with the same factor.
Then we calculate what’s called in lovely audio engineering as “crest factor”, the difference is we don’t do RMS and stuff. But hey again we work with laplace innovations, so we keep things in L0 and L inf spirit. Then we go a couple of steps further, making this crest factor truly relative (resolution agnostic), and then, most importantly, we apply a natural saturation on it based on p-order Möbius transform, but not with arbitrary p and L, but guided by informational limits of the data. These final "intensity" parameters are what we need next to make our object tracking adaptive.
Extended Beta(2, 2) Window
This is imo the main part of this. Looking at tapering windows in DSP and how wavelets are made from derivatives of PDF functions of probability distributions, I figured that why use just one derivative? That made me come up with Universal Moving Average, that combines PDF and CDF of Beta(2, 2) distribution. And that is fine for P (position) tracking model.
Here we need PVA (position & velocity & acceleration). We can realize that everything starts from PDF, and by adding derivatives and anti-derivatives of it as factors of final window weights, we can create smth truly unique, a weightset that is non-arbitrary and naturally provides response alike quadratic regression does, But, naturally smoothed.
Why do I consider this a discovery, a primordial math object? Because x^2 itself and Beta(2, 2) based on it are the only primitives, esp out of all these dozens of DSP tapering windows, that provide you a finite amount of derivatives. You can keep differentiating Hann window until the kingdom f come, while Welch window aka Beta(2, 2) has a natural stopping point, because the 3rd derivative is 0, so we can’t use it. Symmetrically, we do 2 steps up from PDF, getting 1st and second anti-derivatives. What’s lovely, symmetrically, 3rd antiderivative even tho exist, it stops making any sense. 2nd one still makes sense, it’s smth like “potential” of probability distribution, not really discussed in mainstream open access sources.
Finally, the last part is to introduce adaptivity using these intensity exponents we’ve calculated with MFPM. We do 2 separate trackers, one using the negative intensity exponent, another one uses positive intensity exponent.
And at the end, even tho using both together is cool, the final state estimate is calculated simply as the state which intensity has higher.

^^ impulse response of our final kernel with fixed (non adaptive) intensity exponents: 1 (blue) and 2 (red). You see it's all about phase
…
And that’s all folks.
…
Actually no …
Last, not least, is the ability to add additional innovation weight to the kernel:

^^ Weighting by innovations “On”. Provides incredible tracking precision, paid with smoothness. I think this screenshot, showing what happened after the gap, and how the tracker managed to react, explains it all.
...
Live Long and Prosper, all good TradingView
∞
^^ comparison with non-adaptive quadratic regression (purple line), that has higher overshoots, less precision
^^ comparison with JMA and its adaptive gain. JMA’s gain is heavily limited, while UAT’s negative and positive gains are soft-saturated with p-order Möbius transform
This drop is inspired by, dedicated to, and made will all love towards Jurik Research, who retired in October 2k21. When some1 steps out, some1 has to step in, and that time it’s me (again xd). But there’s some history u gotta know:
Some history u gotta know:
In ~2008 dudes from forexfactory reverse engineered Jurik Moving Average
In late 1990s dudes from Jurik Research approximated the best possible adaptive tracking filter for evolution of prices via engineering miracles
Today in 2k26, me I'm gonna present to you the real mathematical objects/entities behind JMA top-edge engineered approximates. You will prolly be even more happy now then all the dem together back then.
Why all this?
When we talk about object tracking stuff, e.g. air defense, drones, missiles, projectiles, prices, etc, it all comes down to adaptive control and (Position & Velocity & Acceleration) aka PVA state space models (the real stuff many of you count as DSP).
Why? Cuz while position (P) : (mean), or position & velocity (PV) : (linear regression) are stable enough in dem own ways, Position & Velocity & Acceleration (PVA) : (quadratic regression+) require adaptivity do be stable. And real world stuff needs PVA, due to non-linearity for starters.
So that’s why. If your goal is Really smoothing and no lag, u gotta go there. I see a lot of folks are crazy with it and want it, so here is it, for y’all. And good news, this is perfect for your favorite Moving Windows.
How to use it
The upper study:
- The final filter (main state): just as you use other fast smoothers, MAs, etc, you know better than me here
- You can also turn in volatility bands in script’s style settings, these do not require any adjustments
- Finally, you can turn on, in the same place, separate trackers each based on negative and positive volatility exclusively. When both are almost equal, that indicates stability & persistence in markets. May sound like it’s nothing important, but I've never seen anything like it before. Also, if you'd allow your our inner mental gym hero gloriously arise, you can argue that these 2 separate trackers represent 2 fair prices (one for sellers, one for buyers). All better then 1 imaginary fair price for both (forget about it)
The lower study:
- The lower study: you can analyze streams of upward of downward volatilities separately. This is incredibly powerful
- You can also turn these off and turn on neg & pos intensities, and use them as trend detector, when each or both cross 1.5 (naturally neutral) threshold.
^^ Upper study with expected typical and maximum volatility bands turned On
...
The method explained
What you got in the end is non-linear, adaptive, lighting fast when needed and slow when required price tracking. All built upon real math entities/objects, not a brilliantly engineered approximation of them. No parameters to optimize, data tells it all.
... It all starts from a process model, in our cause this is...
MFPM (Mechanical Feedback Price Model)
Doesn’t make gaussian assumptions like most quant mainstream tech, accepts that innovations are Laplace “at best”, relies in L inf and L0 spaces.
I created this model neither trynna fit non-fitting ARMA / variants, nor trynna be silly assuming that price state evolution and markets are random.
Theory behind it: if no new volume comes, then price evolution would be simply guided by the feedback based on previous trading activity, pushing prices towards the midrange between 2 latest datapoints, being the main force behind so called “pullbacks” and reason why most pullbacks end just a bit past 50% of a move.
This is the Real mechanical feedback based mean reversion, that is always there in the markets no matter what, think of it as a background process that is always there, and fresh new volume deviates prices away from it. Btw, this can also be expressed as AR2 with both phis = 0.5.
Then I separate positive and negative innovations from this model and process them separately, reflecting the asymmetry between buy and sell forces, smth that most forget. Both of these follow exponential distribution. Each stream has its own memory so here we use recursive operators. We track maximum innovations (differences between real and expected datapoints) with exponentially decaying damping factor, and keep tracking typical innovation, with the same factor.
Then we calculate what’s called in lovely audio engineering as “crest factor”, the difference is we don’t do RMS and stuff. But hey again we work with laplace innovations, so we keep things in L0 and L inf spirit. Then we go a couple of steps further, making this crest factor truly relative (resolution agnostic), and then, most importantly, we apply a natural saturation on it based on p-order Möbius transform, but not with arbitrary p and L, but guided by informational limits of the data. These final "intensity" parameters are what we need next to make our object tracking adaptive.
Extended Beta(2, 2) Window
This is imo the main part of this. Looking at tapering windows in DSP and how wavelets are made from derivatives of PDF functions of probability distributions, I figured that why use just one derivative? That made me come up with Universal Moving Average, that combines PDF and CDF of Beta(2, 2) distribution. And that is fine for P (position) tracking model.
Here we need PVA (position & velocity & acceleration). We can realize that everything starts from PDF, and by adding derivatives and anti-derivatives of it as factors of final window weights, we can create smth truly unique, a weightset that is non-arbitrary and naturally provides response alike quadratic regression does, But, naturally smoothed.
Why do I consider this a discovery, a primordial math object? Because x^2 itself and Beta(2, 2) based on it are the only primitives, esp out of all these dozens of DSP tapering windows, that provide you a finite amount of derivatives. You can keep differentiating Hann window until the kingdom f come, while Welch window aka Beta(2, 2) has a natural stopping point, because the 3rd derivative is 0, so we can’t use it. Symmetrically, we do 2 steps up from PDF, getting 1st and second anti-derivatives. What’s lovely, symmetrically, 3rd antiderivative even tho exist, it stops making any sense. 2nd one still makes sense, it’s smth like “potential” of probability distribution, not really discussed in mainstream open access sources.
Finally, the last part is to introduce adaptivity using these intensity exponents we’ve calculated with MFPM. We do 2 separate trackers, one using the negative intensity exponent, another one uses positive intensity exponent.
And at the end, even tho using both together is cool, the final state estimate is calculated simply as the state which intensity has higher.
^^ impulse response of our final kernel with fixed (non adaptive) intensity exponents: 1 (blue) and 2 (red). You see it's all about phase
…
And that’s all folks.
…
Actually no …
Last, not least, is the ability to add additional innovation weight to the kernel:
^^ Weighting by innovations “On”. Provides incredible tracking precision, paid with smoothness. I think this screenshot, showing what happened after the gap, and how the tracker managed to react, explains it all.
...
Live Long and Prosper, all good TradingView
∞
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Gor Dragongor
t.me/synchro1_channel
linkedin.com/company/synchro1
t.me/synchro1_channel
linkedin.com/company/synchro1
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Gor Dragongor
t.me/synchro1_channel
linkedin.com/company/synchro1
t.me/synchro1_channel
linkedin.com/company/synchro1
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.