EngineMarket Data

Debugging market data

Trace a questionable decision from instrument selection through strategy sampling.

Start at the earliest stage that differs from your expectation. Changing signal thresholds will not fix an incorrect instrument or a missing input window.

1. Verify selection

Check the app's instrument or dated contract, requested interval, UTC bounds, timezone, and execution mode. Compare these with the run you actually selected in History.

For Agent Lab, source changes reuse the saved dataset when its identity matches. If you expected refreshed provider history, first establish which artifact the run consumed.

2. Inspect returned coverage

Inspect the first and last timestamps, ordering, duplicate timestamps, and missing regions. Check required numeric fields. A finite close does not validate high, low, or volume for calculations that depend on them.

Do not infer full coverage from a chart that happens to draw a line across a gap.

3. Inspect frames reaching SJS

Use the observation probe to classify the first invocations. Use the longer-running backtest data diagnostic when you need gap counters.

If raw rows exist but the script does not see them, inspect session gates and cadence. Remember that eligible pending-order fulfillment occurs before the historical loop's strategy-cadence filter.

4. Inspect sampling and readiness

Check whether the strategy accepts repeated timestamps, rejects older observations, resets on gaps, and has enough usable history. Inspect the timestamp of any algorithm or Pine output used in the decision.

A valid current bar does not guarantee a derived signal from that same invocation.

5. Inspect the historical boundary

Verify that history requests end at the intended observation time, not the present wall clock. Check returned rows instead of trusting the request bounds alone. Identify any external data calls outside the saved replay artifact.

Keep a reproducible report

Record the revision and run identifiers, exact instrument, interval and dates, timezone and session settings, first unexpected timestamp, relevant input values, and observed versus expected behavior.

A useful report says “this stored row did not reach SJS under these settings” or “this repeated timestamp was counted as a second sample,” rather than only “the chart looks wrong.”

Once the inputs are explained, continue with SJS debugging for decisions or backtesting debugging for execution outcomes.

On this page