Skip to main content

Market Research and Backtest Prompts for Trading Agents

MCP is at its best when you let the agent gather data, write a strategy that encodes a hypothesis, backtest it through NT8's actual Strategy Analyzer engine, and explain the result without pretending a rough test is a guarantee. The best prompts always include a hypothesis, time window, instrument, and pass/fail criteria.

Related references: Core MCP Tools, Backtesting and Optimization, Backtesting Best Practices, Volume Profile, ATR, and Sharpe vs Sortino.

Session context before a trade idea

Give me a trader's read on ES before the New York open.

Use the current front month. Pull the quote, market metadata, recent 5-minute bars, ATR, and the last day's volume profile. Mark overnight high, overnight low, POC, VAH, VAL, and whether price is opening inside or outside value. Keep it factual. No trade recommendation yet.

This is a good prompt when you want context, not a signal.

Opening range plan

Build me a plan for today's ES opening range.

Use recent 5-minute bars and ATR to estimate whether a 15-minute or 30-minute opening range makes more sense. Compare that with yesterday's range and volume profile. Then give me two scenarios: breakout continuation and failed breakout fade. Do not place orders.

For the strategy concept, see Opening Range Breakout.

Backtest a concrete hypothesis

RunStrategyBacktest drives NT8's actual Strategy Analyzer engine, so the metrics it returns are bit-identical to NT8's UI. It requires a compiled NinjaScript strategy, so the agent has to author one first.

Test this hypothesis on MES 5-minute bars for April 2026:

Long only when price reclaims VWAP after a pullback, RSI is recovering from below 40, and ATR is not expanding above its 20-day median. Exit at 1.2R target, 1R stop, or end of session. One contract.

Write the strategy as VwapReclaimRsi: pull the NinjaScript template and inspect the VWAP / RSI / ATR signatures from this NT8 install first, compile in memory, and only write the file once compile succeeds. Then run RunStrategyBacktest on MES 06-26 over the date range. Poll GetMcpJob until the job completes.

Report trade count, win rate, expectancy, profit factor, Sharpe, Sortino, max drawdown, and the three worst trades from the trades array. If any rule could not be expressed in NinjaScript, say so before writing code instead of pretending an approximation captures it.

Why it works: it asks for a hypothesis, a timeframe, the compile-before-write flow, and the metrics to report. It tells the agent to poll async jobs rather than acting on an incomplete result. The backtest engine itself does not approximate. Every metric in performance.all is NT8's own number, so the prompt's risk is in how the strategy code captures the hypothesis, not in the engine.

Walk-forward style robustness check

A backtest on a single window is a snapshot. Ask the agent to run a few non-overlapping windows so you can see whether the edge is stable.

For my VwapReclaimRsi strategy on MES 5-minute bars, run RunStrategyBacktest on three non-overlapping 30-day windows: Jan, Feb, and Mar 2026. Use identical default parameters in each run. Report NetProfit, profit factor, max drawdown, and trade count side by side.

Tell me if the metrics are consistent or if one window is carrying the others. Do not move on to optimization until I see the three windows.

This is how you detect a strategy that fits one window beautifully and falls apart on the next.

Compare ideas without deploying

Compare three conservative ES day-trade ideas over the last 90 days:

  1. Opening range breakout after a narrow overnight session.
  2. VWAP reclaim after a morning selloff.
  3. ATR contraction breakout after lunch.

Backtest what the engine can reasonably model. Rank them by max drawdown first, then profit factor, then trade count. Do not write code or deploy anything. I only want a research memo with the weakest assumption called out for each idea.

A better prompt than "find me a profitable strategy." It asks for tradeoffs and weak spots.

Cancel a runaway research job

List recent MCP jobs with ListMcpJobs. If any backtest has been running too long or is clearly obsolete, ask me before canceling with CancelMcpJob. After cancellation, show the final job status.

Backtests and compile checks are async. See Core MCP Tools for the job manager tools.

Next: NinjaScript and Strategy Prompts.