Skip to main content

How to Debug a Missed NinjaTrader Copier Fill with AI

A trade copier missed a follower fill. The leader filled, the followers should have followed, one of them did not. This page walks through how to point an AI agent at the data and produce a reliable root cause in minutes.

Start with the symptom

You need three things before the agent can help:

  1. The approximate time window (down to a minute is enough).
  2. The leader account name.
  3. The follower account name that missed.

If the symptom is "follower is one contract short" or "follower took the wrong side," capture those facts in the prompt.

Required data

The agent will read:

ToolUse
GetActivityLog (per account)Routing events and rejections.
ListOrders (per account)What NT8 placed.
ListExecutions (per account)What actually filled.
ListPositions (per account)Current state.
GetAccountSummary / GetWatermarksConstraints.
GetSignalHistory (optional)If the leader was webhook-driven.
GetConnectionsConnection state.

All read-only. mcp:read is enough.

Timeline reconstruction

Ask the agent to reconstruct the timeline minute by minute. A good prompt:

For leader APEX1234 and follower APEX1235 between 14:30 and 14:35 today, pull GetActivityLog for both accounts. Pull ListOrders and ListExecutions for both in the same window. Build a single chronological timeline of every event from both accounts. Note the leader fill, the follower routing decision, and any rejection reason. Tell me exactly where the chain broke.

The agent should produce something like:

14:32:10 APEX1234 (leader) order placed
14:32:10 APEX1234 (leader) fill confirmed, 2 contracts at 5240.25
14:32:10 copier leader fill received
14:32:10 copier follower APEX1235 routing started
14:32:11 copier follower rejected: max contracts (already at 5/5)
14:32:11 APEX1235 (follower) no order placed

The rejection reason is the answer.

Common root causes

Root causeIndicator in the timeline
Max contractsRejection reason explicitly states max contracts.
Daily loss lockoutRejection or no order; account summary shows lockout.
Account disconnectedGetConnections shows disconnected; no follower routing.
Symbol mappingMarketInfo differs across accounts.
Existing position conflictListPositions shows opposite side.
Copier configurationRouted quantity differs from leader; no rejection.
Bracket/ATM mismatchLeader uses bracket; follower has none.

Prompt template

For leader <leader_account> and follower <follower_account> between
<start_time> and <end_time>:

1. Pull GetActivityLog for both accounts.
2. Pull ListOrders for both accounts.
3. Pull ListExecutions for both accounts.
4. Build a single chronological timeline.
5. Identify the step where the follower path broke.
6. State the verbatim rejection reason if any.
7. Tell me the most likely root cause.
8. Suggest a one-line check the trader can run before the next session.

Do not place, cancel, flatten, or modify any order.

Example diagnosis

Walk a typical case:

  • Leader APEX1234 filled long 2 MES at 5240.25.
  • Follower APEX1235 had position state holding 4 MES already.
  • Activity log: follower rejected: max contracts (already at 5/5).
  • Root cause: follower APEX1235 was configured at max 5 contracts; copier was routing the leader's 2 on top of an existing 4, total 6, exceeding the limit.
  • Fix: raise max contracts on APEX1235 if firm rules allow, or close existing position before letting the copier replicate.

The agent's job is to extract the timeline and point at the line. The fix is your judgment.

Fix checklist

After the agent identifies the cause:

  • Is the cause repeatable? Will it fire again on the next leader fill?
  • Is the fix a configuration change in CrossTrade, the broker, or both?
  • Should the follower position be reconciled now?
  • Does the firm allow the proposed change?

FAQ

Does the agent replay missed signals?

No. Read-only.

What if the leader is a webhook-driven strategy?

Add GetSignalHistory to the prompt so the agent can tie the leader fill to the webhook payload.

What if the timestamps don't line up?

Add GetConnections to detect a disconnected/reconnected follower. Also check the system clock on the trader's PC.