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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.