PatternX methodology

Momentum Lab methodology: strategies, states and protection

By the PatternX team ยท Published

Short answer

Momentum Lab is PatternX's Elite engine for US stocks in extended hours. Three deterministic strategies (Premarket Momentum Breakout, Momentum Reversal and Opening Momentum Continuation) move each candidate through fixed states on fresh data only; a mandatory market-cap gate, liquidity filters, sizing caps and breakers stand before every entry, and exits use a trail plus a 3% hard stop. A trail is not a maximum loss.

What Momentum Lab is

Momentum Lab is PatternX's engine for premarket momentum in US stocks, on the Elite plan (pricing). Only Elite can enable strategies, change settings, go live, reset breakers or run backtests; STOP and manual exits work on every plan. It trades through IBKR or Alpaca, or on paper. The product page shows it in use; the Momentum Lab guide documents every parameter.

The engine cycles about once a second (every 30 seconds when the market is closed and nothing is open). Each cycle handles open positions first, so exits take priority, then breakers, then strategies. Sessions run on New York time: premarket 04:00โ€“09:30, regular 09:30โ€“16:00, after-hours 16:00โ€“20:00, with early closes at 13:00 and 17:00 and NYSE holidays applied by rule. Strategies only detect; everything after a trigger is shared.

Three strategies

Premarket Momentum Breakout

The day move is measured from the previous close (or the first fresh premarket price PatternX observed). A stock arms within 2 points of the 5% trigger and triggers after 1 fresh confirmation tick, in premarket and long by default. It must be seen below the trigger first: a stock first seen at +12% is a chase, not a cross. A first sighting more than 3 points past the trigger (above 8%) is "Skipped โ€” Moved Too Far", and after an entry or a skip the stock re-arms only below 4% (breakout parameters).

Momentum Reversal

It tracks each mover's premarket extreme and arms once that extreme is 8% from the reference. It triggers when price retraces 1.5% from the extreme on 2 consecutive fresh observations: a gainer turning down is a short, a loser turning up a long (both by default; shorts need a broker that allows them). It skips a reversal that has already retraced more than 6% ("spent") or whose day move is below 4%, and after a skip or exit it needs a new extreme. Its defaults are stricter: 100,000 shares of premarket volume and a 1% trail (reversal parameters).

Opening Momentum Continuation

A premarket move of at least 5% arms the stock, but entries happen only in the regular session, and a confirmation must pass within 15 minutes of 09:30 or the stock is "Skipped โ€” Session". The default confirmation is a premarket-high breakout (price at least 0.1% above the premarket high). Alternatives: an opening-range breakout over the first 5 minutes, holding above a level (3% by default), VWAP (fails if your source has no VWAP) and volume since the open (off by default). Every selected confirmation must pass; long by default (continuation parameters).

The candidate state machine

A candidate's path through Momentum Lab
  1. WATCHINGMonitored for this strategy; nothing has qualified yet
  2. ARMEDQualified and waiting for its entry condition
  3. TRIGGEREDEntry condition met on fresh data; pre-trade checks run
  4. ORDER_PENDINGEntry order sent, or simulated on paper
  5. PARTIALLY_FILLEDPart of the entry has filled
  6. OPENExits evaluated every cycle
  7. EXIT_PENDINGExit order working
  8. CLOSEDRecorded against its parameter version
  9. COOLDOWNReturns to WATCHING under your re-entry rules

Each stock has one state per strategy and only defined transitions exist, so a second crossing of the same trigger finds the existing state rather than creating a second entry. SKIPPED can end a candidate at any point before a position opens, always with a reason. Stale data cannot arm, confirm or trigger anything. State, water marks and orders are persisted; after a restart, orders are polled again, never resent.

Gates before an entry

The mandatory market-cap gate

Three presets: Broad $100M ("Higher Risk"), Balanced $500M ("Recommended", the default) and Large Cap $2B ("More Selective"). The gate cannot be switched off. A stock exactly at the minimum passes; one without a current figure (none, or one older than 72 hours) never does and is labelled "Skipped โ€” Market cap unavailable", not "below minimum". With IBKR data the figure comes from IBKR, with SEC-derived and Polygon fallbacks; with Alpaca data, only from PatternX's platform Polygon feed (market data; market-cap filters).

Liquidity filters

Defaults: price at least $1; premarket volume at least 50,000 shares (100,000 for Reversal); premarket dollar volume at least $250,000; spread at most 1.0% of the midpoint (no two-sided quote fails); all exchanges; halt detection on; volatility-pause detection on in the regular session. The relative-volume filter is off by default; it needs IBKR data and is not adjusted for time of day. An unknown input never passes a minimum that is switched on.

Sizing

By default a fixed $1,000 per trade (alternatives: % of available capital, % of portfolio, fixed shares), capped at $5,000 per position and by available capital, in whole shares. Each strategy holds at most 3 positions and makes at most 10 entries a day.

Orders and exits

Entries are marketable limit orders at the ask (the bid, for a short) plus a 0.5% buffer, cancelled after 10 seconds unfilled. Exits are marketable limits re-priced on each attempt: 1% through the quote, widening 0.5% per attempt for up to 6 attempts, then retried at the widest buffer with a critical alert. A market order is used only in the regular session when data is stale.

Every cycle checks each position's exits in the fixed order below. Price exits act only on fresh data; clock exits fire even when data is stale.

Exit checks for each open position, in order
  1. Water marks advanceFresh data only: the high never falls, the low never rises
  2. Hard stop3% from the average fill
  3. Trailing stop0.5% (Reversal 1%), following the last trade by default, or the executable side or midpoint
  4. Take-profit and optional exitsNo take-profit by default
  5. Clock exits, even on stale dataSession policy (continue into the regular session by default, or exit before the open, or continue through after-hours); flat 2 minutes before the close; no overnight holds

Protection: Broker Native or Synthetic Trail

Protection is chosen once, at the fill. A Broker Native trailing stop is used only when all of these hold: LIVE mode; prefer native trailing switched on; a trail above 0; an entry filled in the regular session; a broker that supports native trails then; a session policy other than continue through after-hours; and a hard stop of 0. The default 3% hard stop fails the last condition, so with default settings every position uses the PatternX Synthetic Trail.

PatternX evaluates that trail every cycle. In LIVE mode with a hard stop, a GTC STOP_LIMIT emergency stop also rests at your broker, its limit 1% beyond the stop; in extended hours, only where the broker accepts stops then, which IBKR does and Alpaca does not (protection).

What a trailing stop can and cannot do

A trailing stop follows a move and only tightens, so it can keep part of a gain without a fixed target. It cannot cap a loss. A trail is a trigger level, not a fill price: gaps, halts, wide spreads, slippage, partial fills and rejections can push the exit below it, and a synthetic trail acts only on fresh data while PatternX, your broker connection and your data all work. The broker-side STOP_LIMIT can fail to fill when price gaps past its limit.

More in trailing stops for momentum.

Kill switch and breakers

The kill switch blocks new entries and cancels working entry orders; closing open positions is optional. Lab-wide breakers default to a 3% daily loss of equity, 4 consecutive losses, 20 trades a day, 3 execution errors, 30 seconds of data failure and 60 seconds of broker failure; a daily dollar-loss limit and an aggregate exposure cap are off. Breakers only block entries: they never close positions and cannot promise an exit (breakers).

Paper and live

Both run the same engine. Paper starts with $25,000, fills at the ask or bid within your limit, caps partial fills at the displayed size, charges no fees and ignores queue position, so it is kinder than real fills (paper trading). Live needs the typed phrase "ENABLE LIVE TRADING", live trading enabled on the platform and an enabled IBKR or Alpaca live connection.

The optional AI filter

Off by default. It is a fixed weighted formula over market data and your trade history; it does not learn and uses no language model. It runs after every other gate and can only skip or rank.

FactorWeightInput
Relative volume1.6Today's volume รท average daily volume (IBKR data only)
Liquidity1.3Premarket dollar volume
Spread1.2Current bid-ask spread
Volatility1.0Today's move รท 20-day average range
Market regime0.8SPY's move
Sector0.6Unavailable, so it never counts
Catalyst / news0.9Headline count (Alpaca only)
History1.0Your last 50 closed trades

Factors without data are left out; a candidate is kept at a weighted score of at least 60 with at least 2 known factors. Relative volume needs IBKR and news needs Alpaca, so no single source supplies both.

Analytics and limits

Closed positions feed win rate, average win and loss, profit factor, expectancy, net P&L, maximum drawdown, average hold, slippage, MFE/MAE and exit reasons, by strategy, parameter version, session and market-cap preset; the gap between a trail and its fill is recorded as slippage, not hidden. Limits: movers lists rather than the whole market, polling rather than every tick, paper fills kinder than live ones, and extended hours with thinner books and wider spreads (extended-hours risks; Investor.gov). Backtests are covered in how PatternX backtests work.

Frequently asked questions

Can Momentum Lab trade through brokers other than IBKR and Alpaca?

No. It executes only through IBKR or Alpaca, or on paper; other brokers you connect to PatternX are not used by Momentum Lab.

Why didn't Momentum Lab buy a stock that was already up 12%?

Buying a move that has already happened is a chase. The breakout strategy waits for a genuine cross of its trigger and refuses entries first seen far past it, so a stock already well beyond the trigger has to pull back first.

Does tripping a circuit breaker close my positions?

No. Breakers only stop new entries. Open positions keep their exits, and closing them is a separate action: the kill switch with its close option, or a manual exit.

When does Momentum Lab use my broker's own trailing stop?

Only in live mode when every condition holds, including a hard stop of 0 and an entry filled in the regular session. With the default 3% hard stop, positions use the PatternX Synthetic Trail, plus a broker-side emergency stop where the broker accepts one.

Is the Momentum Lab AI filter a language model?

No. It is a fixed weighted score built from market data and your own closed trades, and it can only skip or rank candidates that already passed every other gate.

References

  1. Investor.gov (investor.gov)

Related reading

Educational content, not financial advice. Chart patterns describe probabilities, not certainties; trading โ€” especially with leverage or outside regular hours โ€” can lose money, including more than you expect. See the risk disclaimer.