OPEN-SOURCE SCRIPT
更新済

Physics of Price

1 407
Physics of Price is a non-repainting kinematic reversal and volatility overlay. It models price as a physical object with position, velocity, and acceleration, then builds adaptive bands and a short-term predictive “ghost cone” to highlight where reversals are statistically more likely.

CONCEPT
Instead of using only moving averages, the core engine tracks a smoothed price (position), trend speed (velocity), and change in trend speed (acceleration). Standard deviation of the model error defines probabilistic bands around this kinematic centerline. When price stretches too far away and snaps back, the move is treated as a potential exhaustion event.

CORE COMPONENTS
– Kinematic centerline (Alpha–Beta–Gamma style filter) that bends with trend instead of lagging like a simple MA.
– Inner and outer bands based on the standard deviation of residuals between price and the kinematic model.
– Regime filter using R² and band width to avoid signals in chaotic or ultra-wide regimes.
– Optional RSI “hook” filter that waits for momentum to actually turn instead of buying into a falling RSI.
– Optional divergence add-on using kinematic velocity, so a marginal new price extreme with weaker velocity is recognized as a possible exhaustion pattern.

REVERSAL EVENTS AND SCORING
Raw events are detected when price wicks through the outer band and closes back inside (band hit with snap). These are plotted as diamonds and treated as candidates, not automatic trades.
Each event is then scored from 0 to 100 using several factors:
– How far price overshot the outer band.
– How strongly it snapped back inside.
– Whether an RSI hook is present (if enabled).
– Regime quality from the kinematic model.
– Basic kinematic safety to avoid the most aggressive “knife-catch” situations.
– Optional divergence bonus when price makes a new extreme but velocity does not.

Only events with a score above the chosen threshold become confirmed signals (triangles labeled PHYSICS REV).

GHOST CONE (PREDICTIVE BAND)
On the latest bar, the script projects a short-horizon “ghost cone” into the future using position, velocity, and a damped acceleration term. This creates a curved predictive band that visualizes a plausible short-term path and range, rather than a simple straight line. The cone is meant as context for trade management and risk, not as a hard target.

FILTERS AND OPTIONS
– Regime filter (R² and band width) can be tightened or relaxed depending on how selective you want the engine to be.
– RSI and volume filters can be toggled on for extra confirmation or off to see the raw kinematic behavior.
– An optional trend baseline (EMA) can be enabled to bias or restrict reversals relative to a higher-timeframe trend.
– Dynamic cooldown scales with volatility so the script does not spam signals in fast environments.

HOW TO USE
Physics of Price is primarily a mean-reversion and exhaustion tool. It works best in markets that respect ranges, swings, and two-sided order flow. Confirmed PHYSICS REV signals near the outer bands, with decent model health and a clean RSI hook, are the core use case. The bands and ghost cone can also be used as a context overlay alongside your own entries, exits, and risk framework.

This is an indicator, not a complete trading system. It does not use lookahead or higher-timeframe security calls and is designed for “once per bar close” alerts. Always combine it with your own risk management and confluence.

リリースノート
Physics of Price v3 – What’s New vs. the Original

This update is a full upgrade of the original Physics of Price—same core idea (treat price as a physical object in 1D space), but a much smarter engine around it.

1. Smarter Kinematic Core (α–β–γ from one knob)
The original PoP let you tune alpha, beta and gamma manually. v3 derives all three gains from a single smoothing parameter (λ), using standard tracking-filter relationships. That gives you:

More stable behaviour across markets and timeframes

Less guesswork in tuning

A cleaner separation between “how fast should it react” and everything else

You still see the kinematic estimate hugging price, but with fewer random oscillations and more consistent response in trends and reversals.

2. Ghost Cone → True Probabilistic Forecasting
The old “ghost” projection was mainly a forward extrapolation of velocity and acceleration. In v3 the cone is rebuilt around uncertainty:

The cone width expands with forecast horizon using separate velocity and acceleration uncertainty terms

Confidence is explicitly controlled via a σ-multiplier (1–3σ style, like a proper confidence band)

Cone color adapts to the predicted direction of motion

Visually: instead of a decorative toy projection, you get a forward envelope that actually encodes “how wrong could this be” as time goes on.

3. Regime-Aware Engine (Trend × Volatility Grid)
The original script was “regime-sensitive” via R² and volatility, but everything lived in one blended filter. v3 makes regime explicit:

Trend is classified as Up / Flat / Down using normalized velocity vs ATR

Volatility is classified as Low / Normal / High using ATR vs its own SMA

Combined into a 3×3 grid (9 regimes) used everywhere else in the logic

This regime index is the backbone of the new learning and gating system.

4. Virtual Trades and Embedded Win-Rate Learning
The original PoP fired signals based purely on physics + bands. v3 silently runs “virtual trades” in the background for each regime:

When a raw long/short signal appears, v3 opens a virtual trade with TP/SL defined in ATR units

It tracks whether that virtual trade would have hit TP or SL first

It accumulates wins, losses, win rate and expected value (EV in ATR units) per regime and direction

Nothing is auto-traded; this is purely internal scoring. But you now have an indicator that knows which environments it has historically done well in—and which ones to avoid.

5. Statistics-Gated Signals (Physics × Regime EV)
Original PoP: if a setup met the physics conditions, it plotted.
Physics of Price v3 adds a second, independent filter layer:

Signals are only allowed when the current regime has:

Enough samples (minimum trade count)

Win rate above your threshold

Positive expected value after fees/slippage (also expressed in ATR units)

If a raw physics setup appears in a “bad” regime, it is marked as blocked (small grey markers) instead of a full signal

Result: you keep the physics-based edge, but only express it where historical behaviour suggests it actually pays.

6. Cleaner Raw Signal Logic (Bands + Snapback + Kinematics)
The event logic has been simplified and hardened:

Price must pierce the adaptive tracking band and then close back inside (snapback)

Candle direction must agree with the reversal (e.g., green candle off lower band for a long)

Velocity/acceleration must be consistent with a potential turn (kinematic confirmation)

Confidence is computed from R², penetration depth and kinematic alignment instead of a long list of arbitrary weights

This keeps the original PoP “physics reversal” personality, but with more transparent and interpretable ingredients.

7. Two-Layer HUD (Instant Readability)
The display layer was rebuilt for faster decision-making:

Top-right HUD: current regime, normalized velocity/acceleration, R², 5-bar forecast, and live long/short win rate and EV for the active regime

Bottom-right Regime Matrix: a 3×3 grid summarizing win rate and EV for all 9 regimes, with the current cell highlighted

You can see at a glance: “Is the model confident here, and has this environment actually been profitable for this logic?”

8. Non-Repainting, Alert-Ready, and Practical Defaults
As with the original Physics of Price:

The script runs fully on confirmed bar data (no repainting of signals)

All alerts are defined on the gated signals (plus raw signals if you want to monitor them separately)

Defaults are chosen to be conservative and interpretable out of the box, while still allowing deeper tuning for advanced users

This is not a strategy or financial advice—just a more disciplined, physics-inspired framework for understanding where price is likely to go and when that information has historically been worth acting on.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。