Market State Tracker

Unlike widely-known alternatives, this model is made with top state-space and innovation modelling tech, and it takes the necessary info ‘itself’ (not the derivatives) from the right places. In fancy terms it’s not even a model, it’s an ensemble of several models. If you want to get familiar with other work of mine like this, check UAT.
^^ compared with reverse-engineered Jurik Moving Average in moving window mode
…
Main use case: take-profit engine. It tells whether to hold a position past its primary 1:1 Risk:Reward take-profit up to the opposite entry), or to close it right away at 1:1.
Alternative use case: market state operator. Alternatively the study can be used as a primary market-state operator that would actually define further strategies and actions. It’s very useful if your strategies are not market regime agnostic. Otherwise, use it only as the main use case tells.
Other use cases: anything that other mainstream studies are doing, but better* (proceed to the Tech Note in the end of the post): trend detection, price smoothing, crossovers, dynamic S&R etc.
…
How to use:
The script has 2 studies, lower study (blue and red lines) and upper study (purple and gray lines).
...
Lower study is less variance & more bias option, in general it’s less preferred than upper study, but if none of your other system layers do not gauge directional info directly and you wanna keep it simply this way, this lower study is what you need.
Lower study states -> advised take-profit strategy:
- When: negative gamma (red line) is above positive gamma (blue line), market is biased towards sell side, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
- When: positive gamma (blue line) is above negative gamma (red line), market is biased towards buy side, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
...
Upper study is the preferred one in general because of its higher informational content. Most probably, if you’re already gaining directional info on your other system layers, this one will likely provide you information you don’t gain there. Here the purple line is the lead state estimate, and the gray line is the lagged state estimate, and current price = current bar POC or HLC3 (inferred POC).
Upper study states -> advised take-profit strategy:
- When: current price > purple line > gray line, market is heavily biased towards buy side, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
- When: current price < purple line < gray line, market is heavily biased towards sell side, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
- When: purple line > gray line > current price, market is biased towards another buy wave, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
- When: purple line < gray line < current price, market is biased towards another sell wave, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
- All other price x purple line x gray line patterns are considered neutral, and both longs and shorts are done with minimal 1:1 Risk:Reward.
Important: if you trade based on current session activity, you have to track current states. If you trade based on previous session levels, you only need the last state of that session that originated the level.
Important 2: The script has a setting called “blend”. The differences between all 3 options provided there are extremely low, and moreover it doesn’t change the main part: location of crossovers. So I left it here because I genuinely don’t know yet which of these is the most primordial math option for the current context xd.
...
* now about this:
Tech note
In short: it gains all the information without touching artifacts with the best possible math that runs on O(1) time complexity.
The ‘final’ time complexity of the whole method is O(1), both in moving and expanding window modes.
The main short-term forecasting & innovations engine, I called it VAPM (Volume Acceleration Price Model), is inspired by how prediction and NaN fills works on the lowest hardware level, processor cache etc. It’s based on splines, the most fundamental geometrical principles. This is the stuff you can run on FPGAs doing UHFT, not even HFT.
Based on lead/lag and negative/positive relationships with the VAPM forecasts, innovations are separated into 4 different streams.
Each stream of these 4 then discovers its own adaptive gain (limited by theoretical constraints of the exponential distribution each stream follows).
Then, 4 separate PVA (Position Velocity Acceleration) state-space models are run on POC estimate of each bar, using previously computed 4 different adaptive gains. Initial impulse response of the models was almost exactly matched with the Extended Beta(2, 2) Window, provided in UAT open access script (heck the code & description, it would worth it).
Then these 4 separate trackers are grouped pairwise and blended into 2, resulting in the lead/lag model.
Additionally, 4 adaptive gains are blended into 2 separate pos/neg models. I offer 3 blending options: max(), contraharmonic mean, and Log-Sum-Exp. The differences of outputs based on these 3 options are almost negligible.
All possible hidden issues like info leakage from previous finished expanding windows, or special cases of forecasts at the very few first datapoints, are taken into account and solved. The whole method has zero constants and zero pre-optimized or arbitrary values, everything based on fundamental math entities / objects.
…
∞
Skrip jemputan sahaja
Hanya pengguna disahkan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Keizinan selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi gorx1 secara terus.
TradingView TIDAK menyarankan pembayaran atau penggunaan skrip kecuali anda mempercayai sepenuhnya penulis dan memahami bagaimana ia berfungsi. Anda juga boleh menjumpai alternatif sumber terbuka dan percuma yang lain di dalam skrip komuniti kami.
Arahan penulis
t.me/synchro1_channel
linkedin.com/company/synchro1
Penafian
Skrip jemputan sahaja
Hanya pengguna disahkan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Keizinan selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi gorx1 secara terus.
TradingView TIDAK menyarankan pembayaran atau penggunaan skrip kecuali anda mempercayai sepenuhnya penulis dan memahami bagaimana ia berfungsi. Anda juga boleh menjumpai alternatif sumber terbuka dan percuma yang lain di dalam skrip komuniti kami.
Arahan penulis
t.me/synchro1_channel
linkedin.com/company/synchro1