OPEN-SOURCE SCRIPT
Advanced Physics Trading System + Analytics Suite

Advanced Physics Trading System + Analytics Suite
A Multi-Dimensional Market State Analyzer
Overview
The Advanced Physics Trading System (APTS) is a comprehensive market-state analyzer that applies classical physics principles to price action — velocity, acceleration, force, kinetic and potential energy, mass, temperature, and Shannon entropy. Combined with a full analytics suite (geometry, time symmetry, regime persistence, and situational awareness), it delivers a multi-dimensional view of what the market is actually doing — not just where price is.
Unlike single-indicator tools that fire signals from one rule set, APTS treats the market as a physical system with measurable properties. It reads momentum, exhaustion, coil formation, and regime shifts across five independent dimensions, then ranks the current setup with a single composite score.
Core Concept
The market is a system in motion. Price moves because of force — mass (volume) applied to acceleration (change in velocity). When force fades, energy dissipates and the market coils. When force surges, energy releases and trends accelerate.
APTS formalizes this intuition with eight physics dimensions:
Dimension Physical Meaning Market Interpretation
Velocity Rate of price change (ATR-normalized) Direction and speed of the move
Acceleration Change in velocity Momentum building or fading
Force Mass × Acceleration Real directional pressure
Mass Volume vs. average Conviction behind the move
Kinetic Energy ½ × mass × velocity² Magnitude of motion
Potential Energy Spring-tension from mean Distance from equilibrium
Temperature Smoothed absolute velocity Volatility regime
Entropy Shannon entropy of volume-work Order vs. chaos regime
These feed a five-dimension agreement matrix: velocity, acceleration, force, entropy (order), and volume-work each classify as bullish, bearish, or neutral. The result — netAgreement from −5 to +5 — is the single most diagnostic output of the system.
Timeframe Presets
The system ships with six presets covering every trading style:
Preset Best For Lookback Threshold Behavior
Scalp (5m) 1m–5m scalping 20 Tight filters, high energy threshold
Intraday (15m) 15m intraday 18 Balanced
Swing (1H) 30m–1H swing 14 Default
Swing (4H) 2H–4H swing 14 Wider, cleaner signals
Position (D) Daily position 12 Slowest, highest conviction
Manual Custom tuning user Full override
Auto mode reads the chart timeframe and picks the matching preset automatically — no re-tuning when you switch timeframes.
What the System Produces
1. The Physics Dashboard
A live 13-row panel showing every physics dimension in real time:
Velocity, Acceleration, Force, Volume Work
Entropy, Impulse, Kinetic Energy, Potential Energy
Total Energy, Temperature
Current signal (BUY / SELL / NEUTRAL)
Active preset
Each value is color-coded by direction and magnitude — green for bullish, red for bearish, with intensity reflecting strength.
2. Dimension Agreement Matrix
A 5×2 grid showing each dimension's state:
Bull Agreement — how many of 5 dimensions are bullish (0–5)
Bear Agreement — how many are bearish (0–5)
Net Agreement — bull minus bear, from −5 to +5
When all 5 agree, you have a Full Agreement — the highest-conviction setup the system produces.
3. Physics Geometry
Tracks the size and duration of physics regime flips:
Average height % per flip
Average bars per flip
Efficiency (% move per bar)
Distance to rolling high/low
4. Time Symmetry
Measures whether up-phases last longer than down-phases:
Symmetry ratio > 1.2 — bullish time bias (up moves take longer)
Symmetry ratio < 0.8 — bearish time bias
Between — balanced
5. Regime Persistence
Tracks how stable the current regime is:
Entropy slope — is chaos rising (regime breaking) or falling (stabilizing)?
Compression streak — consecutive quiet flips (coil loading)
Expansion streak — consecutive big flips (breakout action)
Coil status — active or idle
Phase state — velocity and acceleration in agreement or diverging?
6. Situation Table
A single-glance summary with:
Current situation — one of 14 states (Full Agreement, Spring Release, Confirmed Breakout, Exhaustion Top, Coil Formation, Chaotic Regime, etc.)
Plain-English suggestion — actionable context for the setup
Composite score, rank score, agreement count, time symmetry
Physics-Specific Signals
APTS produces signals that don't exist in price-action or momentum-only systems:
Signal Meaning
Coil Formation Kinetic low, potential high — spring loading for a move
Spring Release Coil broke with a force impulse — momentum entry
Exhaustion Top Velocity positive, acceleration negative — momentum fading
Exhaustion Bottom Velocity negative, acceleration positive — reversal forming
Full Agreement All 5 dimensions align — highest conviction
Physics Disagreement Dimensions conflict — reduce size, wait
Phase Transition Velocity and acceleration diverge in sign
Entropy Shift Regime crossed orderly/chaotic boundary
Plus breakout and continuation flags:
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Trending Bull / Bear
Scanner Integration
APTS is scanner-ready for TradingView's Pine Screener. It exposes:
10 numeric metrics:
Physics Entropy, Agreement, Geometry %, Time Symmetry
Composite, Rank Score, Compression Streak, Expansion Streak
% To High, % To Low
4 grouped flag outputs (bit-packed for efficiency):
Group 1: Bullish Setups
Group 2: Bearish Setups
Group 3: Warnings / Exhaustion
Group 4: Coil / Regime
Filter on any combination to build custom scans across your watchlist.
Example Scan Recipes
Highest-Conviction Long
text
Flag: Full Agreement = 1
Physics Agreement >= 3
Physics Rank Score > 2.0
Coil Watchlist
text
Flag: Coil Formation = 1
Physics Entropy < 0.7
Immediate Action — Spring Release
text
Flag: Spring Release = 1
Bull Trend with Clean Physics
text
Flag: Trending Bull = 1
Physics Agreement >= 2
Physics Time Symmetry > 1.2
Exhaustion Warnings (Fade)
text
Flag: Exhaustion Top = 1
Physics Agreement >= 2
Chaotic — Avoid
text
Flag: Physics Disagree = 1
Alerts
The system includes 19 alert conditions:
Original signals (3):
Physics Buy / Sell
High Market Entropy
Physics-specific (7):
Coil Formation, Spring Release
Exhaustion Top / Bottom
Full Agreement, Physics Disagreement
Phase Transition
Breakout & continuation (6):
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Regime (2):
Trending Bull / Bear
Rank score (2):
Top Bull / Top Bear
All alerts fire on bar close by default for clean signals.
Why This System Is Different
Most indicators answer one question. RSI asks "is it overbought?" MACD asks "is momentum accelerating?" ATR asks "how volatile is it?" Each works within a narrow slice of market reality.
APTS asks eight questions simultaneously — velocity, acceleration, force, kinetic energy, potential energy, entropy, volume-work, and temperature — and then asks "how many of them agree?"
That multi-dimensional agreement is the core value. When five independent physics readings all point the same way, the signal isn't a guess — it's a confirmed state.
Additionally:
The entropy filter separates orderly markets (tradeable) from chaotic ones (avoid)
The coil/release detector finds setups before price breaks out
The exhaustion signals flag momentum fading before reversal
The rank score gives you a single sortable number for scanning
The timeframe presets remove the tuning burden
Who This Is For
Trader Type Fit
Intraday (15m–1H) ✅ Primary user — best signal-to-noise balance
Swing (4H–D) ✅ High-quality, lower-frequency signals
Position (D–W) ✅ Best with a watchlist + scanner
Scalper (1m–5m) ⚠️ Works with Scalp preset but noisy
Price-action purist ❌ Too many metrics — prefers simple charts
Beginner ⚠️ Requires understanding of velocity/energy concepts
Recommended Workflow
Load APTS on your primary trading timeframe (1H or 4H recommended)
Check the Dimension Agreement table — is netAgreement clearly positive or negative?
Look at the Situation table — what state is the market in?
Wait for a specific signal:
Coil Formation → prepare
Spring Release → enter
Full Agreement → highest conviction
Exhaustion → exit
Confirm with physics dashboard — is the reading consistent?
Manage with alerts — set alerts on the 19 conditions and let the system notify you
For multi-symbol scanning:
Run APTS as a weekly or daily scanner across your watchlist
Filter for Group 1: Bullish Setups > 0 or specific bit combinations
Build a shortlist
Drop to a lower timeframe for entry timing
Confirm with the physics dashboard on the entry chart
Limitations & Honest Notes
Best on 1H–Daily. Lower timeframes (1m–5m) become noisy even with the Scalp preset. Weekly is too slow for reliable statistics.
Not a standalone trading system. APTS reads the market — it doesn't manage positions, size trades, or place orders. It's a decision-support tool.
Requires context. The signals are meaningful only when read alongside price action and your own risk framework.
Learning curve. Understanding velocity, acceleration, and entropy takes time. The system is not "one glance and go."
Not a crystal ball. Physics describes what is happening — it doesn't predict the future. It shifts probabilities, not certainties.
Summary
The Advanced Physics Trading System treats the market as a physical system and measures it accordingly. It produces:
5-dimension agreement — the core diagnostic
6 analytics tables — geometry, time, regime, situation
8 physics-specific signals — coil, release, exhaustion, agreement
19 alerts — covering every setup type
10 scanner metrics + 4 grouped flags — filterable in TV Screener
For traders who want to see why the market is moving — not just that it is — APTS delivers a level of market introspection that traditional indicators cannot.
Works on all timeframes. Presets auto-tune for your chart. Scanner-ready for multi-symbol hunting.
Trade with physics. Trade with clarity.
FOR EDUCATIONAL PURPOSES ONLY
NOT A FINANCIAL ADVICE
A Multi-Dimensional Market State Analyzer
Overview
The Advanced Physics Trading System (APTS) is a comprehensive market-state analyzer that applies classical physics principles to price action — velocity, acceleration, force, kinetic and potential energy, mass, temperature, and Shannon entropy. Combined with a full analytics suite (geometry, time symmetry, regime persistence, and situational awareness), it delivers a multi-dimensional view of what the market is actually doing — not just where price is.
Unlike single-indicator tools that fire signals from one rule set, APTS treats the market as a physical system with measurable properties. It reads momentum, exhaustion, coil formation, and regime shifts across five independent dimensions, then ranks the current setup with a single composite score.
Core Concept
The market is a system in motion. Price moves because of force — mass (volume) applied to acceleration (change in velocity). When force fades, energy dissipates and the market coils. When force surges, energy releases and trends accelerate.
APTS formalizes this intuition with eight physics dimensions:
Dimension Physical Meaning Market Interpretation
Velocity Rate of price change (ATR-normalized) Direction and speed of the move
Acceleration Change in velocity Momentum building or fading
Force Mass × Acceleration Real directional pressure
Mass Volume vs. average Conviction behind the move
Kinetic Energy ½ × mass × velocity² Magnitude of motion
Potential Energy Spring-tension from mean Distance from equilibrium
Temperature Smoothed absolute velocity Volatility regime
Entropy Shannon entropy of volume-work Order vs. chaos regime
These feed a five-dimension agreement matrix: velocity, acceleration, force, entropy (order), and volume-work each classify as bullish, bearish, or neutral. The result — netAgreement from −5 to +5 — is the single most diagnostic output of the system.
Timeframe Presets
The system ships with six presets covering every trading style:
Preset Best For Lookback Threshold Behavior
Scalp (5m) 1m–5m scalping 20 Tight filters, high energy threshold
Intraday (15m) 15m intraday 18 Balanced
Swing (1H) 30m–1H swing 14 Default
Swing (4H) 2H–4H swing 14 Wider, cleaner signals
Position (D) Daily position 12 Slowest, highest conviction
Manual Custom tuning user Full override
Auto mode reads the chart timeframe and picks the matching preset automatically — no re-tuning when you switch timeframes.
What the System Produces
1. The Physics Dashboard
A live 13-row panel showing every physics dimension in real time:
Velocity, Acceleration, Force, Volume Work
Entropy, Impulse, Kinetic Energy, Potential Energy
Total Energy, Temperature
Current signal (BUY / SELL / NEUTRAL)
Active preset
Each value is color-coded by direction and magnitude — green for bullish, red for bearish, with intensity reflecting strength.
2. Dimension Agreement Matrix
A 5×2 grid showing each dimension's state:
Bull Agreement — how many of 5 dimensions are bullish (0–5)
Bear Agreement — how many are bearish (0–5)
Net Agreement — bull minus bear, from −5 to +5
When all 5 agree, you have a Full Agreement — the highest-conviction setup the system produces.
3. Physics Geometry
Tracks the size and duration of physics regime flips:
Average height % per flip
Average bars per flip
Efficiency (% move per bar)
Distance to rolling high/low
4. Time Symmetry
Measures whether up-phases last longer than down-phases:
Symmetry ratio > 1.2 — bullish time bias (up moves take longer)
Symmetry ratio < 0.8 — bearish time bias
Between — balanced
5. Regime Persistence
Tracks how stable the current regime is:
Entropy slope — is chaos rising (regime breaking) or falling (stabilizing)?
Compression streak — consecutive quiet flips (coil loading)
Expansion streak — consecutive big flips (breakout action)
Coil status — active or idle
Phase state — velocity and acceleration in agreement or diverging?
6. Situation Table
A single-glance summary with:
Current situation — one of 14 states (Full Agreement, Spring Release, Confirmed Breakout, Exhaustion Top, Coil Formation, Chaotic Regime, etc.)
Plain-English suggestion — actionable context for the setup
Composite score, rank score, agreement count, time symmetry
Physics-Specific Signals
APTS produces signals that don't exist in price-action or momentum-only systems:
Signal Meaning
Coil Formation Kinetic low, potential high — spring loading for a move
Spring Release Coil broke with a force impulse — momentum entry
Exhaustion Top Velocity positive, acceleration negative — momentum fading
Exhaustion Bottom Velocity negative, acceleration positive — reversal forming
Full Agreement All 5 dimensions align — highest conviction
Physics Disagreement Dimensions conflict — reduce size, wait
Phase Transition Velocity and acceleration diverge in sign
Entropy Shift Regime crossed orderly/chaotic boundary
Plus breakout and continuation flags:
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Trending Bull / Bear
Scanner Integration
APTS is scanner-ready for TradingView's Pine Screener. It exposes:
10 numeric metrics:
Physics Entropy, Agreement, Geometry %, Time Symmetry
Composite, Rank Score, Compression Streak, Expansion Streak
% To High, % To Low
4 grouped flag outputs (bit-packed for efficiency):
Group 1: Bullish Setups
Group 2: Bearish Setups
Group 3: Warnings / Exhaustion
Group 4: Coil / Regime
Filter on any combination to build custom scans across your watchlist.
Example Scan Recipes
Highest-Conviction Long
text
Flag: Full Agreement = 1
Physics Agreement >= 3
Physics Rank Score > 2.0
Coil Watchlist
text
Flag: Coil Formation = 1
Physics Entropy < 0.7
Immediate Action — Spring Release
text
Flag: Spring Release = 1
Bull Trend with Clean Physics
text
Flag: Trending Bull = 1
Physics Agreement >= 2
Physics Time Symmetry > 1.2
Exhaustion Warnings (Fade)
text
Flag: Exhaustion Top = 1
Physics Agreement >= 2
Chaotic — Avoid
text
Flag: Physics Disagree = 1
Alerts
The system includes 19 alert conditions:
Original signals (3):
Physics Buy / Sell
High Market Entropy
Physics-specific (7):
Coil Formation, Spring Release
Exhaustion Top / Bottom
Full Agreement, Physics Disagreement
Phase Transition
Breakout & continuation (6):
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Regime (2):
Trending Bull / Bear
Rank score (2):
Top Bull / Top Bear
All alerts fire on bar close by default for clean signals.
Why This System Is Different
Most indicators answer one question. RSI asks "is it overbought?" MACD asks "is momentum accelerating?" ATR asks "how volatile is it?" Each works within a narrow slice of market reality.
APTS asks eight questions simultaneously — velocity, acceleration, force, kinetic energy, potential energy, entropy, volume-work, and temperature — and then asks "how many of them agree?"
That multi-dimensional agreement is the core value. When five independent physics readings all point the same way, the signal isn't a guess — it's a confirmed state.
Additionally:
The entropy filter separates orderly markets (tradeable) from chaotic ones (avoid)
The coil/release detector finds setups before price breaks out
The exhaustion signals flag momentum fading before reversal
The rank score gives you a single sortable number for scanning
The timeframe presets remove the tuning burden
Who This Is For
Trader Type Fit
Intraday (15m–1H) ✅ Primary user — best signal-to-noise balance
Swing (4H–D) ✅ High-quality, lower-frequency signals
Position (D–W) ✅ Best with a watchlist + scanner
Scalper (1m–5m) ⚠️ Works with Scalp preset but noisy
Price-action purist ❌ Too many metrics — prefers simple charts
Beginner ⚠️ Requires understanding of velocity/energy concepts
Recommended Workflow
Load APTS on your primary trading timeframe (1H or 4H recommended)
Check the Dimension Agreement table — is netAgreement clearly positive or negative?
Look at the Situation table — what state is the market in?
Wait for a specific signal:
Coil Formation → prepare
Spring Release → enter
Full Agreement → highest conviction
Exhaustion → exit
Confirm with physics dashboard — is the reading consistent?
Manage with alerts — set alerts on the 19 conditions and let the system notify you
For multi-symbol scanning:
Run APTS as a weekly or daily scanner across your watchlist
Filter for Group 1: Bullish Setups > 0 or specific bit combinations
Build a shortlist
Drop to a lower timeframe for entry timing
Confirm with the physics dashboard on the entry chart
Limitations & Honest Notes
Best on 1H–Daily. Lower timeframes (1m–5m) become noisy even with the Scalp preset. Weekly is too slow for reliable statistics.
Not a standalone trading system. APTS reads the market — it doesn't manage positions, size trades, or place orders. It's a decision-support tool.
Requires context. The signals are meaningful only when read alongside price action and your own risk framework.
Learning curve. Understanding velocity, acceleration, and entropy takes time. The system is not "one glance and go."
Not a crystal ball. Physics describes what is happening — it doesn't predict the future. It shifts probabilities, not certainties.
Summary
The Advanced Physics Trading System treats the market as a physical system and measures it accordingly. It produces:
5-dimension agreement — the core diagnostic
6 analytics tables — geometry, time, regime, situation
8 physics-specific signals — coil, release, exhaustion, agreement
19 alerts — covering every setup type
10 scanner metrics + 4 grouped flags — filterable in TV Screener
For traders who want to see why the market is moving — not just that it is — APTS delivers a level of market introspection that traditional indicators cannot.
Works on all timeframes. Presets auto-tune for your chart. Scanner-ready for multi-symbol hunting.
Trade with physics. Trade with clarity.
FOR EDUCATIONAL PURPOSES ONLY
NOT A FINANCIAL ADVICE
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.