Trading bot scope builder

Engineering note · Replay data provenance

Imported Tick Data Is Not Native NinjaTrader Market Replay

Compare NinjaTrader Market Replay, Tick Replay and imported tick data by event semantics, Level II depth and fixed-day acceptance tests.

8 minute read

Visible symptom

A strategy behaves differently when the same day is run with imported ticks and native Market Replay.

Root boundary

The files may share timestamps and prices while carrying different event types, ordering and depth.

Hard rule

Two data sources are equivalent only for the behavior their recorded events can actually reproduce.

A tick file and a replay recording answer different questions

A developer can import historical ticks, see plausible bars and still fail to reproduce a native NinjaTrader Market Replay run. That is not automatically a bad import. It usually means the comparison started with file size or price coverage instead of data provenance and event semantics.

The practical question is not whether both sources contain many price updates. It is whether they contain the exact events the strategy observes. A bar-close strategy may only need reliable timestamps and OHLCV. A strategy that reacts to bid and ask changes, queue movement or Level II depth needs much more. Missing event types cannot be reconstructed from a close price later.

Follow the provenance before comparing results

Start with a one-line chain for each run. Name the provider, raw format, conversion step, import settings, NinjaTrader connection, session template and strategy mode. If one link is unknown, the result is not yet reproducible.

Source

provider and raw events

Transform

time zone, filter, import

Runtime

connection and strategy mode

What the three common sources preserve

Names such as tick data and replay data are too broad for an acceptance decision. Record what is present and what is absent.

SourceWhat it representsDepth boundaryTypical runtime
Native Market ReplayRecorded event stream for the platform replay connectionCan include ordered Level I and Level II events when that depth was recordedReplays through the Market Replay connection
Historical tick dataHistorical trade and quote records supplied by a providerUsually does not reproduce the original order-book event sequenceUsed by historical processing and may support Tick Replay
Imported bars or ticksA transformed file with the fields the importer acceptsLimited to the fields and ordering preserved by the source and import formatUseful for historical tests, but not automatically a Market Replay recording

The smallest useful comparison

  1. 1

    Freeze one day.

    Use one instrument, session template, time zone, trading-hours template and strategy version.

  2. 2

    Run sources separately.

    Clear cached and merged data paths. Never let a fallback feed hide a missing event.

  3. 3

    Record the first divergence.

    Compare event time, event type, price, volume and strategy state at the first different decision.

  4. 4

    Classify the difference.

    Separate missing data, reordered data, transformed timestamps and strategy-mode behavior.

  5. 5

    State the valid boundary.

    A source can be valid for bar-close tests while remaining invalid for order-flow or depth logic.

Three acceptance tests

These tests turn a vague replay mismatch into a report another developer can reproduce.

Test 1

Fixed-day event comparison

Input: Choose one instrument, trading day, session template and time zone. Run each source separately.

Pass: The report lists event counts, timestamps, OHLCV and session boundaries without silently merging sources.

Test 2

Depth and ordering check

Input: Record whether bid, ask, trade and ordered Level II updates exist in each source.

Pass: A source is called equivalent only when the event types and their order needed by the strategy are present.

Test 3

Strategy divergence run

Input: Run the same strategy and settings once per source, with no fallback feed or mixed cache.

Pass: Every difference in trigger time, fill sequence and resulting state is reported from the first divergence.

What this comparison does not prove

A source that passes these checks for one strategy is not universally equivalent to Market Replay. The required event set changes with the strategy. A bar-close system, an intrabar indicator and an order-flow tool observe different boundaries.

The comparison also says nothing about profitability. It only establishes whether the test input and execution path are documented well enough to explain a difference. Broker fills, commissions, slippage and live latency remain separate acceptance boundaries.

Free next step

Freeze the comparison before buying more data

Use the free scope builder to record the instrument, date, time zone, session, event types and three pass cases. That one page is enough to keep a replay investigation from turning into an open-ended data search.