OrderFlowAi / Features / CORTEX Neural Engine
● CORTEX · LSTM DEEP LEARNING · LIVE v1.0

A neural network that thinks the order flow

CORTEX Neural Engine is not indicator math dressed up as AI. It is a real LSTM network that learns from the order book tick by tick, identifies market regimes, and makes entry decisions in real time. Live as the core of the Pro plan since v0.3.0.

Enrico Westenburger April 2026 ~10 min read Advanced

The gap between a rule-based trading system and a learning system is fundamental. Rules are static: they work until the market steps outside their assumed range. A learning system adapts. The CORTEX Neural Engine is such a system — a Long Short-Term Memory (LSTM) network that learns tick by tick from the order book of E-mini S&P 500 and related futures contracts.

This article explains how CORTEX is built technically, how the engine differs from the classic Reversal AI Scanner, what reinforcement learning means in practical trading terms — and why an LSTM model with regime adaptation is a better fit for order flow data than off-the-shelf machine learning.

STATUS

CORTEX Neural Engine v1.0 has been in production since April 17, 2026 (v0.3.0 launch). The engine runs as a dedicated process inside the OrderFlowAi Pro desktop app and communicates directly with the NinjaTrader 8 strategy bridge. The current weight set is built on 196 documented trade episodes.

Why an LSTM for order flow?

Classical machine-learning models — Random Forests, Gradient Boosting, XGBoost — are memoryless. They treat each second as an independent observation. For order flow, that is fatal. Order flow is a sequential process: the meaning of a single market order depends on what happened in the 200 milliseconds before it inside the book.

LSTM networks (Long Short-Term Memory) are designed exactly for that kind of sequence data. They carry internal memory cells that hold state across seconds to minutes and forget selectively. A price move combined with a building iceberg and a simultaneous delta shift becomes a sequence — not three disconnected events.

LSTMs have dominated natural-language processing since 2015 because language is sequential. Institutional quant desks have used LSTM variants for market making since around 2018. For retail order-flow tools, learning sequence models are still uncommon — and that is exactly where the edge sits.

CORTEX processes a 10-dimensional feature vector per time step: cumulative delta, bid/ask pressure ratio, order-book imbalance, iceberg count, spoof count, HTF-ATR, HTF-trend score, session phase, regime tag, and a price-difference series. These ten dimensions are processed through a three-layer LSTM followed by a dense layer with softmax output for the three classes LONG / SHORT / NEUTRAL, plus three regression outputs for confidence, accuracy, and reversal phase.

CORTEX vs. Reversal AI Scanner — two different networks

Two AI-based components live on the product side. The distinction matters because each solves a different problem:

PropertyReversal AI ScannerCORTEX Neural Engine
TaskReversal setup detection on the chartOverall directional decision + auto-trading
Network typeFeed-forward / 4-phase pattern3-layer LSTM
Features10 chart-pattern features10 sequence features from the order book
OutputReversal yes/no + phaseLONG / SHORT / NEUTRAL + confidence
Learning modeOffline pre-trainedReinforcement learning live
Trade executionNoYes (via NT8 strategy)

In short: the Reversal AI Scanner is an alert generator. CORTEX is a decision system. Both can run in parallel — the scanner supplies regime hints, CORTEX makes the call.

The three core components

LAYER 1
LSTM Sequence Core
Three stacked LSTM layers, 64 neurons each, dropout 0.2. Each forward pass ingests 60 time steps (1 second). Held constantly in memory — no per-tick re-training. Inference under 4 ms on CPU.
64 · 64 · 64 Dropout 0.2 CPU inference
LAYER 2
Regime Adapter
A separate classifier identifies the current regime (QUIET, TRENDING, VOLATILE, REVERSAL) and weights the LSTM output accordingly. In TRENDING, confidence biases toward the trend direction; in VOLATILE, exposure is reduced.
4 regimes Dynamic gating Adaptive size
LAYER 3
Reinforcement Feedback
After every closed trade the engine updates a weighted score per signal combination (e.g. Spoof_NEUTRAL, VP_TREND_BEAR). Signals that frequently lead to winners get up-weighted. No model re-training — only weight adjustment.
Per-trade update Signal weighting No retrain

Reinforcement learning — what it really means in trading

The term "reinforcement learning" (RL) is often misused in trading marketing. In CORTEX, the implementation is transparent and pragmatic: every closed trade produces a label (win, loss, breakeven) and a signal combination. The active combination gets stored in a weighted table — strategy_learn.json.

If a signal pair like Spoof_NEUTRAL hit a 65 percent win rate over the last 50 trades, the combination receives a 1.19 multiplier. A pair stuck at 35 percent drops to 0.82. On the next entry scan these multipliers are applied to the LSTM confidence — the network itself does not retrain, but its outputs get calibrated to the live context.

CURRENT RL WEIGHTS (as of April 17, 2026)

Top weights in the active set: Spoof_NEUTRAL 1.19 · VP_TREND_BEAR 1.18 · Ice_TREND_BEAR 1.12. Total trade count: 196. Every Pro user can export, import, or reset their own learn state.

Pretrained model — the cold-start advantage

An untrained RL system usually needs 200 to 500 real trades to build stable weights. That is impractical for an individual trader. CORTEX ships with a pretrained weight file built on nearly 200 real ES trades under live market conditions (Q1 2026, full session coverage, no simulation).

When the strategy is activated for the first time, it does not start from zero — it inherits these pretrained weights. From the first personal trade onward, the weights personalize. Each trader shapes their own model over time. The import function is available directly in the Pro UI since build 33 (file picker with a safety backup).

Integration — how CORTEX talks to the NT8 strategy

The engine does not run inside NinjaTrader. It is a module of the OrderFlowAi Pro desktop app that streams signals over a JSON bridge to the NT8 strategy OrderFlowAiStrategy.cs. The strategy then combines those signals with its own rule-based logic (eight independent signal sources, score-based).

The final word always sits with the strategy — CORTEX delivers direction bias and confidence, never the execution order. The strategy decides based on MinScore, MinAIConf, regime, session phase, and an ATR-spike guard. This two-stage design is intentionally conservative so that a single bad AI signal cannot directly fire a trade.

Signal protocol (simplified)

{
  "aiDir": "LONG",
  "aiConf": 72,
  "aiAcc": 0.64,
  "aiRevPhase": 0,
  "aiLongProb": 0.72,
  "aiShortProb": 0.18,
  "regime": "TRENDING",
  "timestamp": 1713441254812
}

The strategy checks the timestamp field on every entry candidate — if the signal is older than 30 seconds, it gets discarded (staleness check). This prevents stale AI output from firing trades into a new market state.

What CORTEX is NOT

More important than marketing claims is honest delimitation:

  • Not a ChatGPT wrapper. CORTEX does not use any large language model. It is a dedicated LSTM with numerical inputs and numerical outputs.
  • Not a black-box oracle. Every input, every RL weight, and every signal is traceable through the journal. The learn state exports as JSON for inspection.
  • Not a profit guarantee. Even a learning system produces losing trades. CORTEX improves average signal quality — not individual trade outcomes.
  • Not an autonomous bot without controls. Every auto-trade runs through the NT8 strategy with session guards, max-consecutive-loss stop, and a pause function.

Frequently asked questions

Is CORTEX only usable on ES futures?
The pretrained model was trained on ES data, but it runs on any futures contract with sufficient DOM volume (NQ, CL, GC, MES). For less liquid instruments the LSTM sequence becomes too noisy — we recommend manual mode there.
How often is the model updated?
The LSTM weights themselves are retrained in larger release cycles (the next model update is planned after 500 cumulative community trade episodes). The RL weights, in contrast, adapt live with every trade.
What happens during a market crash or extreme volatility?
The strategy has several protection layers: an ATR spike filter (news protection), max-consecutive-loss stop, flat-before-close, and since v7.4 an early-open soft guard. CORTEX itself automatically lowers confidence in REVERSAL and VOLATILE regimes.
Can I use CORTEX as a signal source only, without auto-trading?
Yes. The engine runs independently of the NT8 strategy. In the Pro app's chart and heatmap windows you see the current CORTEX direction, confidence, and regime — use it as visual context and trade manually.
How is this different from "AI" marketing in other tools?
Most "AI" labels in the retail market describe moving averages with dynamic parameters or simple classifiers. CORTEX is a genuine recurrent neural network with a transparent RL loop. The engine source is obfuscated, but the specification and signal outputs are documented and inspectable.
Is CORTEX included in the Starter or Trial plan?
CORTEX Neural Engine and auto-trading are exclusive to the Pro and Institutional plans. The 14-day trial has the full Pro version active. Starter does not include the neural engine or auto-trading.

Related articles

Test CORTEX Neural Engine live

14 days free in the Pro trial. Full engine, auto-trading, pretrained model — no credit card required.

Requires NinjaTrader 8 with a Level-2 market-data subscription (dxFeed, Rithmic, or CQG)

START TRIAL ▶ Auto-trading in detail