OPEN-SOURCE SCRIPT
Kinetic Regression Vector

Kinetic Regression Vector (KRV) is a non-repainting direction and compression indicator designed for one job: help you avoid low-quality markets and catch high-quality expansion moves when the odds improve.
Most “prediction” tools either repaint, lag, or pretend they can call exact future prices. KRV doesn’t do that. Instead, it focuses on what actually improves trading outcomes: regime quality, directional bias, and compression-to-expansion timing — all shown visually and locked on closed candles.
What goes into it (what it’s built from)
KRV fits a smooth model to the last N bars of price action and projects that structure forward as a “vector tunnel.”
It uses three core ideas:
Weighted Least Squares (WLS) regression
Recent candles matter more than older ones. That means the model reacts faster when conditions change (important for sector shifts and fast ETF rotations), without using lagging moving averages.
Quality gating with R²
The indicator measures whether the market has been clean and structured recently. If structure is weak (chop/noise), KRV effectively turns itself “off” so you’re not trading randomness.
Model-based uncertainty bands (SEE) with a volatility fallback
Instead of sizing the tunnel only by volatility, KRV can size it by how consistent the model has been. When the model is unreliable, the tunnel widens. When it’s reliable, the tunnel tightens. If you prefer classic behavior, ATR-based band sizing is available as a fallback.
What makes it different (why it stands out)
KRV stands out because it combines features that are usually not together in one tool:
Adaptive, model-driven tunnel width (based on model error when SEE is enabled), instead of a fixed volatility channel that can look “confident” even in messy regimes.
Directional bias that is not a moving-average lag (it’s based on the fitted structure’s slope).
A compression trigger that is self-relative (pinch compares current band width to its own historical baseline, not an arbitrary threshold).
Strict non-repaint design (signals are computed from closed candles so the chart doesn’t lie after the fact).
Forward visualization (the tunnel projects into the future as a reference map, with uncertainty naturally increasing forward).
What you see on the chart
Vector Tunnel: the projected path and the expected noise range around it.
Color: bullish or bearish bias based on the current slope of the model.
Pinch: compression detected (band width unusually tight versus its baseline).
Bull/Bear Bullets: confirmed pinch signals aligned with directional bias.
Target Marker: a forward reference point based on the current structure (not a guarantee, but a useful reference level).
How to use it (simple, repeatable)
Use it as a three-step decision tool:
Gate (participate or stand down):
If the model is not “on” (quality is weak), treat it as a “stay out” signal. This is the most important feature for avoiding bad trades.
Direction (bias):
When the model is on, follow the bias. Bull bias means your edge is on longs. Bear bias means you avoid longs (or only take bearish setups if you trade that way).
Pinch + confirmation (timing):
A pinch means pressure is building. The bullet marks “compression + bias.” For best results, act after you see expansion confirmation (breakout candle / range expansion / level break) rather than treating the bullet as a blind entry.
Best features (why traders keep it)
Non-repainting signals locked to closed bars
Clear “stay out” logic during chop
Direction bias that responds faster than classic lagging tools
Compression detection designed to highlight expansion windows
Forward tunnel for planning risk, entries, and exits visually
Best markets and timeframes
KRV performs best on liquid ETFs and liquid large-cap stocks, and on sector themes like energy where regime shifts matter.
Recommended timeframes:
4H: best for timing entries and avoiding noise
Daily: best for swing direction and higher-quality setups
Weekly: best for big-picture regime filtering (stay out vs participate)
Monthly can be used for macro regime, but not for timing.
What to expect (honest expectations)
KRV is not a guaranteed predictor of exact prices. Its edge comes from:
filtering out weak/noisy regimes,
identifying compression that often precedes expansion,
and aligning that setup with a directional bias,
without repainting.
Most “prediction” tools either repaint, lag, or pretend they can call exact future prices. KRV doesn’t do that. Instead, it focuses on what actually improves trading outcomes: regime quality, directional bias, and compression-to-expansion timing — all shown visually and locked on closed candles.
What goes into it (what it’s built from)
KRV fits a smooth model to the last N bars of price action and projects that structure forward as a “vector tunnel.”
It uses three core ideas:
Weighted Least Squares (WLS) regression
Recent candles matter more than older ones. That means the model reacts faster when conditions change (important for sector shifts and fast ETF rotations), without using lagging moving averages.
Quality gating with R²
The indicator measures whether the market has been clean and structured recently. If structure is weak (chop/noise), KRV effectively turns itself “off” so you’re not trading randomness.
Model-based uncertainty bands (SEE) with a volatility fallback
Instead of sizing the tunnel only by volatility, KRV can size it by how consistent the model has been. When the model is unreliable, the tunnel widens. When it’s reliable, the tunnel tightens. If you prefer classic behavior, ATR-based band sizing is available as a fallback.
What makes it different (why it stands out)
KRV stands out because it combines features that are usually not together in one tool:
Adaptive, model-driven tunnel width (based on model error when SEE is enabled), instead of a fixed volatility channel that can look “confident” even in messy regimes.
Directional bias that is not a moving-average lag (it’s based on the fitted structure’s slope).
A compression trigger that is self-relative (pinch compares current band width to its own historical baseline, not an arbitrary threshold).
Strict non-repaint design (signals are computed from closed candles so the chart doesn’t lie after the fact).
Forward visualization (the tunnel projects into the future as a reference map, with uncertainty naturally increasing forward).
What you see on the chart
Vector Tunnel: the projected path and the expected noise range around it.
Color: bullish or bearish bias based on the current slope of the model.
Pinch: compression detected (band width unusually tight versus its baseline).
Bull/Bear Bullets: confirmed pinch signals aligned with directional bias.
Target Marker: a forward reference point based on the current structure (not a guarantee, but a useful reference level).
How to use it (simple, repeatable)
Use it as a three-step decision tool:
Gate (participate or stand down):
If the model is not “on” (quality is weak), treat it as a “stay out” signal. This is the most important feature for avoiding bad trades.
Direction (bias):
When the model is on, follow the bias. Bull bias means your edge is on longs. Bear bias means you avoid longs (or only take bearish setups if you trade that way).
Pinch + confirmation (timing):
A pinch means pressure is building. The bullet marks “compression + bias.” For best results, act after you see expansion confirmation (breakout candle / range expansion / level break) rather than treating the bullet as a blind entry.
Best features (why traders keep it)
Non-repainting signals locked to closed bars
Clear “stay out” logic during chop
Direction bias that responds faster than classic lagging tools
Compression detection designed to highlight expansion windows
Forward tunnel for planning risk, entries, and exits visually
Best markets and timeframes
KRV performs best on liquid ETFs and liquid large-cap stocks, and on sector themes like energy where regime shifts matter.
Recommended timeframes:
4H: best for timing entries and avoiding noise
Daily: best for swing direction and higher-quality setups
Weekly: best for big-picture regime filtering (stay out vs participate)
Monthly can be used for macro regime, but not for timing.
What to expect (honest expectations)
KRV is not a guaranteed predictor of exact prices. Its edge comes from:
filtering out weak/noisy regimes,
identifying compression that often precedes expansion,
and aligning that setup with a directional bias,
without repainting.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。