Escape Velocity: Gravity & Coil Signals [Alpha Agent]

1 277
Escape Velocity looks for the moment a market stops struggling and starts moving.

This is the rebuilt, open-source version of my earlier script Houdini. The full source code is published here.

IN PLAIN ENGLISH

Most of the time, price spends a lot of effort going nowhere: volume comes in, candles overlap, and the net result is a sideways grind. Escape Velocity measures that struggle (I call it Price Gravity) and watches for two conditions that can come before a clean move:

- Compression: price gets squeezed into a narrowing wedge. The script draws it as an amber COIL zone.
- Release: the struggle eases and price starts traveling efficiently in one direction again.

When those line up, it prints a signal. Every signal is confirmed on bar close, so what you see on a closed bar does not change afterwards.

On the chart you get:
- LONG / SHORT: the primary entries (neon rings).
- COIL: an amber compression zone, drawn when a wedge matures. While the zone is live, hover its COIL label to see the bias.
- SIG9: a confirmed cup-and-handle breakout (expansion).
- LONG+ / SHORT+: the 4-hour chart confirms the move. It can appear on a LONG or SHORT entry, or on its own as a separate 4-hour signal.
- A glowing adaptive corridor that shows the current trend leg, plus the two legs before it.
- A status panel (the Agent HUD, top right) that shows the current state, regime, flow quality, path efficiency and the last entry.
- A trade manager that draws entry, stop and three targets for a LONG / SHORT (one managed trade at a time).

Two display styles, same signals: Terminal (default) and Alpha-Glow (the Alpha Agent neon palette).


HOW IT WORKS (FOR QUANTS)

Escape Velocity combines five components. Each has a single job, and the signals come from how they line up, not from any one of them alone.

1. Price Gravity (the core model)
- Effort is volume normalized against its own time-of-day profile: a per-minute seasonal baseline built over roughly the last 20 sessions. When volume is unavailable, true range is used instead.
- Displacement is the net log move over the window, divided by the move you would expect from recent return volatility.
- Path efficiency is net move divided by total path traveled, from 0 to 1.
- Gravity rises when effort is high but displacement and efficiency are low: energy is being absorbed without progress.
- The main inputs are converted to robust z-scores (median / MAD) so the model adapts across symbols and sessions.
- A directional split (upside vs downside effort and gravity) tells the engine which side is doing the work.

2. Adaptive structure corridor
- The corridor's center line is a Kaufman adaptive average. Its width is ATR-based and widens automatically as the market gets noisier (lower efficiency ratio).
- The regime (BULL / BEAR / TRANSITION) needs slope, efficiency and position all to agree. A regime only flips after price holds beyond the opposite band for consecutive closed bars, which filters one-bar wicks.

3. COIL (compression)
- A wedge is drawn from the last two confirmed pivot highs and the last two confirmed pivot lows.
- It qualifies when both edges slope the same way, converge to a clearly narrower width than where they started, and hold that shape for several consecutive closed bars.
- A falling wedge gives COIL with a bullish bias; a rising wedge gives COIL with a bearish bias.

4. Entries
- LONG: a bullish COIL must come first. A LONG prints only if, within a short window after it, price either shifts the structure regime to bullish or closes through the wedge's upper edge. This sequencing (compression, then release) is the heart of the long side.
- SHORT: fires when downside path efficiency is high and most of a nine-part gravity-release checklist agrees (efficiency building, gravity easing, displacement expanding, effort aligned to the downside). A cooldown prevents clustering.
- SIG9: a cup-and-handle breakout. It needs a cup of meaningful ATR depth, a shallow handle, a pattern that has matured, and a closed-bar break of the handle high.

5. STRONG 4H power (the + badge)
- A confirmation layer from the completed 4-hour bar: trend filter, fast-average cross and above-average volume.
- On charts below 4H it reads only the last completed 4H bar, using TradingView's documented non-repainting request pattern. On a 4H chart it uses the chart's own closed bars. It is disabled on charts above 4H.


WHAT MAKES IT ORIGINAL

- Price Gravity is my own effort-versus-progress model. It combines time-of-day-normalized effort, volatility-scaled displacement and path efficiency into one robust score, with a directional split.
- LONG entries are gated by a compression-then-release sequence (COIL first, then a structural or wedge breakout), not by a single trigger.
- The COIL zone shows the engine's actual wedge rather than a generic pattern overlay.
- Signals, zones, corridor and HUD share one visual language, so the whole state reads at a glance.


HOW TO USE IT

- Use standard candles. On Heikin Ashi, Renko, Kagi, Point & Figure, Line Break and Range charts, the script hides its signals, zones, trade levels and panels and shows a notice instead.
- Works on intraday and higher timeframes. The seasonal effort model works best on liquid intraday symbols with volume.
- Read the HUD first: REGIME and FLOW tell you whether the market is trending cleanly or chopping.
- A live COIL zone means compression. Watch which side price leaves it from.
- LONG / SHORT are the entries. SIG9 and COIL are context, not entries.
- Alerts: create them on a standard-candle chart and set them to "Once Per Bar Close". Available alerts cover COIL (ARMED) long/short, structure changes, LONG, SHORT, SIG9 (listed as MAGIC SIG9), STRONG long/short, and the trade manager events (activated, TP1, profit lock, TP2, TP3, stop, timeout).

Settings, briefly:
- Trade Manager: Auto ATR or Fixed Dollar stop and targets, profit lock after TP1, maximum holding bars.
- Display: signal hierarchy, Terminal / Alpha-Glow style, signal size, corridors, corridor fill (Neon Glass / Original / Subtle), COIL zones, HUD on/off and position.


LIMITATIONS AND DISCLOSURES

- Bar-close confirmation: signals appear when the bar closes, not intra-bar. That is deliberate, and it means entries arrive after the triggering candle is complete.
- The COIL zone is drawn back to the wedge's starting point. It is drawn once, on the bar COIL fires, using only pivots already confirmed on that bar, and its shape never changes afterwards. Pivots confirm a few bars after they form, so COIL is by nature a slightly delayed read of compression.
- LONG is selective: it needs a prior COIL, so it will not catch every rally.
- STRONG reads the last completed 4-hour bar, so it can lag by up to one 4H bar. It is off on charts above 4H.
- The seasonal effort baseline needs a few sessions of intraday history. Until then the script uses a standard average. On symbols without volume, effort falls back to true range.
- Trade manager levels are a visual guide, not orders. Target and stop hits are judged from bar highs and lows, so the order of intra-bar touches cannot be known, and fills, slippage and fees are not modeled.
- Alerts are evaluated on whatever chart they are created on. Create them on standard candles.
- No indicator predicts the future. Signals are designed to flag conditions that can come before directional moves; they are not guarantees. Nothing here is financial advice.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。