Skip to content
ELITE FEATURE Β· MCP

NinjaTrader 8 MCP server.
NinjaScript, accounts and Tradovate.

Connect Claude, ChatGPT or another supported AI client to CrossTrade's hosted MCP server. Inspect installed NinjaScript, compile drafts and run supported Strategy Analyzer backtests in your running NT8 installation. Read or manage linked Tradovate accounts in the cloud through the separate Tv_ tools. CrossTrade MCP also exposes webhook history, journal records and copier diagnostics. Access requires CrossTrade Elite.

Your existing NinjaTrader 8

Read accounts and orders, manage trades, inspect installed NinjaScript, compile drafts and run supported Strategy Analyzer backtests. These tools reach your own NT8 installation through the CrossTrade add-on. NT8 must stay running and connected.

Explore the NT8 strategy workflow or follow a reproducible backtest.

Tradovate with your computer off

The Tv_ tools read linked accounts, positions, orders and fills, and place or manage supported orders server-side. No NT8 add-on is needed. NinjaScript and Strategy Analyzer work still belongs to the NT8 connection.

Link a Tradovate account, then use the Tradovate MCP tools reference.

When to evaluate native NinjaTrader MCP

If you want direct AI access to an eligible NinjaTrader brokerage account, evaluate its native MCP. Its official documentation describes account reads and order management through remote HTTPS/OAuth. The safety page reviewed November 14, 2026 no longer carries the earlier beta notice. Check NinjaTrader's current connection and account requirements rather than assuming universal availability.

Choose CrossTrade for access to your NT8 installation and surrounding automation workflows. Compare native MCP, Nina and CrossTrade.

NT8
Strategy Analyzer engine
Your AI
Supported MCP clients
Inspect
Real NT8 signatures
Verify
Jobs and strategy state

Read the MCP setup and permissions documentation. OAuth scopes determine which tools your client can call. Choosing an integration? Compare hosted, native and local NinjaTrader MCP servers, or review MCP vs REST vs WebSocket for your workflow.

Bring a workflow. Verify the result.

If you already have NinjaScript, start by inspecting the installed strategy and running one reproducible backtest. If you have only an idea, use the compile loop to turn it into a testable draft. A chat response is not a completed job or a deployed strategy.

Research an NT8 strategy

Use your actual NT8 data, trading hours and fill settings. Read the completed job, compare a single run, then evaluate a separate period. Webhook alerts alone do not provide this research interface.

Check backtest requirements and limits

Inspect an existing trading setup

Start with account state, positions, working orders and diagnostics. Select the permissions your workflow needs. For a custom indicator, verify the available tools and exposed values before assuming an agent can read everything drawn on a chart.

Inspect capabilities and scope permissions.

Why CrossTrade for AI trading

AI access to the NT8 setup you already run.

Other ways to trade with AI

  • Self-hosted GitHub projects you install, run and maintain yourself
  • Native broker-account MCP tools with their own access requirements
  • Standalone code generators that leave you to compile and diagnose the draft
  • Separate interfaces for strategy work and automation troubleshooting

CrossTrade

  • Your desktop and workflowInspect your NT8 installation alongside CrossTrade webhook history, journal records and copier diagnostics.
  • NinjaTrader 8 and TradovateOne server, both brokers. The Tradovate tools run in our cloud, so your agent can work while your computer is off.
  • The whole strategy loopWrite NinjaScript, compile it, backtest it in NT8's own Strategy Analyzer, sweep parameters, deploy, and verify, in one conversation.
  • Hosted MCP connectionAdd one URL to a supported AI client and authorize it. NT8 operations use the CrossTrade NT8 Add-On running on your computer.
  • Your permissions, your gatesOAuth scopes decide which tools are available. Configure per-action approvals in your AI client and verify the account before acting.

NinjaTrader also documents native MCP and a desktop AI Strategy Builder in beta. Read the dated comparison of native MCP, Nina and CrossTrade.

You shouldn't have to learn C# to backtest a hypothesis

NinjaScript is a great execution environment for live trading. It is a terrible place to iterate on ideas by hand. You have to compile, attach to a chart, configure Strategy Analyzer, click around for parameters, wait, read a results panel that's locked inside the desktop app, then translate everything back into a hypothesis you can adjust. An AI trading agent on the MCP Trading API collapses that loop into a chat session.

YOU (in Claude, ChatGPT, or Cursor)

Write a simple ATR-trailing-stop strategy on MES that goes long when the 9-EMA crosses above the 21-EMA. Backtest April 2026, 5-minute bars. Sweep ATR from 1.5 to 3.0 in 0.25 steps. Tell me the best parameters by NetProfit, then run a full backtest with those and show me every trade.

ILLUSTRATIVE WORKFLOW Β· NOT A RECORDED RESULT

I'll inspect NT8's actual EMA / ATR signatures first, compile in memory, write the strategy, run the sweep, then drill into the winner.

β†’ GetNinjaScriptHelp Β· LookupNinjaScriptSymbol(EMA) Β· CompileNinjaScript(in_memory:true) Β· WriteNinjaScriptFile

β†’ RunStrategyBacktest with optimization.parameters_sweep: [{name:"AtrStop", min:1.5, max:3.0, step:0.25}]

β†’ Poll each job with GetMcpJob. Read the actual ranking, parameters and metrics returned by your install.

β†’ Re-run the selected parameter set as a full single backtest, then evaluate a separate period. Report the result even if it loses money.

What your trading agent can do

Every tool here is exposed through the Model Context Protocol. Any MCP-compatible AI client (Claude, ChatGPT, Cursor, Continue, Cline) can call them with the user's permission.

Both brokers are covered, but not identically. The NinjaTrader tools do strategy work as well as trading, because NinjaTrader is where NinjaScript and the Strategy Analyzer live. Tradovate gets a parallel set of Tv_ tools for accounts, positions, orders, fills, margin and contract lookup, running server-side with nothing open on your machine. An agent can read and trade a Tradovate account while your computer is asleep; it cannot write or backtest a strategy there.

An MCP client sends a plain-language request. The CrossTrade MCP server authorizes it with OAuth, checks scope and the Elite gate, picks the right typed tool, and calls through to your NinjaTrader add-on or your linked Tradovate account. Results come back as a plain-language answer.
Where an agent request goes, and what it is allowed to reach.

Write NinjaScript with AI

Your agent pulls the real signatures from your NT8 install (not stale training data) and uses compiler diagnostics to repair the draft. A successful sandbox compile comes before the approved source-file write and NT8 rebuild.

AGENTIC

Backtest 1:1 with NT8

RunStrategyBacktest drives Strategy.RunBacktest() through NT8's actual Strategy Analyzer engine for supported configurations. Match your data, dates, trading hours, inputs and fill settings against the UI, then compare the returned trades and metrics.

CORE

AI parameter sweeps

Pass an optimization.parameters_sweep argument and your agent cartesian-enumerates every combination. Read the returned ranking block for the requested fitness or its fallback, then inspect the selected parameters in a full single run.

OPTIMIZE

Deploy + monitor

The same parameters your agent backtested with go straight into DeployStrategy. The MCP deployment registry tracks every strategy your agent has launched, and GetDeployedStrategyState returns the live NT8 state (trading? active orders? bar count?) on demand.

LIFECYCLE

See your real risk

Account balances, open positions, working orders, executions, daily watermarks, and quote snapshots are all available as MCP tools. Build prompts that refuse to deploy if drawdown is too deep or the position would breach a prop-firm limit.

SAFETY

Alert through your channels

EmitMcpAlert routes agent-generated alerts through your in-app notifications, email, Discord, or Telegram. Build prompts that ping you when a backtest finishes, a sweep identifies a winner, or a deployed strategy reaches a threshold.

CORE

The full idea β†’ live agent loop

Every step is one MCP tool call. The AI sequences them. You approve the gates.

01

Inspect

GetMcpCapabilities, LookupNinjaScriptSymbol, SearchNinjaScriptSymbols, GetNinjaScriptHelp. Your agent reads the actual NinjaTrader surface available in your install.

02

Write

The agent encodes your hypothesis as NinjaScript. Idiomatic C#, sized for the NT8 version it just inspected. No copy-pasted templates from training data.

03

Compile

CompileNinjaScript(in_memory:true) validates syntax against the running NT8 AppDomain. Fully isolated until you approve writing the file.

04

Backtest

RunStrategyBacktest runs the strategy through NT8's Strategy Analyzer engine. Use matching supported settings and retain the returned job evidence.

05

Optimize

Pass optimization.parameters_sweep to enumerate every parameter combination. Read the ranking metadata for the actual fitness used.

06

Deploy

DeployStrategy launches the compiled strategy headlessly or attaches it to a chart. GetDeployedStrategyState verifies it actually reached active state.

Make the result reproducible

Save the strategy source, exact inputs and returned job result. Compare the same supported configuration in the desktop Strategy Analyzer when you need to verify the execution path.

Checkpoint
Record
Verify
Strategy
Versioned source and class name
Same compiled class
Data
Contract, dates, bars and trading hours
Same historical inputs
Execution assumptions
Fill resolution, slippage and commission
Same supported settings
Result
Completed job, metrics and trade list
Actual returned evidence
Forward simulation
Confirmed simulation account and deployment
Live state, bars, positions and orders

Historical jobs use NT8’s isolated Backtest account. Sim101 is for a separately approved forward-simulation deployment. Follow the complete walkthrough.

What the wire actually looks like

You probably won't write these by hand. Your trading agent does. But here's what your agent is sending.

MCP tools/call Β· single backtest
{
  "method": "tools/call",
  "params": {
    "name": "RunStrategyBacktest",
    "arguments": {
      "strategy_class": "MyEma20Reversal",
      "instrument":     "MES 06-26",
      "bars_period":    {"period_type": "Minute", "value": 5},
      "from":           "2026-04-01T00:00:00Z",
      "to":             "2026-04-30T00:00:00Z",
      "parameters":     {"Quantity": 1, "StopAtrMultiplier": 2.25},
      "fill":           {"slippage_ticks": 0}
    }
  }
}
MCP tools/call Β· parameter sweep
{
  "method": "tools/call",
  "params": {
    "name": "RunStrategyBacktest",
    "arguments": {
      "strategy_class": "MyEma20Reversal",
      "instrument":     "MES 06-26",
      "bars_period":    {"period_type": "Minute", "value": 5},
      "from":           "2026-04-01T00:00:00Z",
      "to":             "2026-04-30T00:00:00Z",
      "optimization": {
        "fitness": "MaxNetProfit",
        "parameters_sweep": [
          {"name": "StopAtrMultiplier", "min": 1.5, "max": 3.0, "step": 0.25},
          {"name": "TargetRatio",       "min": 1.0, "max": 2.0, "step": 0.25}
        ]
      }
    }
  }
}

A real agent prompt

You don't issue tool calls one at a time. You write one prompt and let the agent sequence dozens of calls inside your guardrails. Drop this into Claude Desktop, Claude Code, Cursor, or any MCP client connected to CrossTrade and watch the full loop run.

Idea-to-simulation agent prompt

Help me test a one-contract MES strategy. Begin with research and a proposed specification. Do not place orders or deploy.

1. Inspect capabilities, available data and existing scripts. Confirm the instrument, bar period and session rules.

2. Restate the entry, exit and sizing rules, then show a versioned NinjaScript draft.

3. After approval, compile in memory and poll the job. Repair diagnostics. Ask before writing; wait for F5 if the response says file_only.

4. Propose exact test dates, costs and fill settings. Run the approved configuration and return the actual trades and metrics.

5. If I approve a bounded sweep, preserve fixed inputs and evaluate the selected parameters on a separate period.

6. Stop for review. Only deploy after I confirm an available simulation account and the final parameters.

7. Read GetDeployedStrategyState and account positions/orders. Distinguish a processing strategy from a filled trade.

See the full prompt library for account-risk agents, market-research agents, NinjaScript authoring agents, and operational shutdown agents.

Honest limitations

Most "AI for trading" marketing pages would skip this section. We won't. Here are the constraints you'll actually run into building trading agents on CrossTrade MCP.

  • Optimization is cartesian. Pass optimization and the agent enumerates every combination. GeneticOptimizer and StrategyGenerator names are accepted but the iteration loop is exhaustive. Requested fitness is used where supported; inspect ranking for the actual fitness or NetProfit fallback.
  • Sweep parameter types. Only int / long / double / float / decimal are sweepable. Boolean and enum strategy inputs can still be fixed via the parameters argument.
  • NT8 must be running, for the NT8 tools. The MCP server is hosted, but the NinjaTrader tools talk to your NT8 desktop over the CrossTrade NT8 add-on. If NT8 is offline, those tools return a clear error instead of inventing fake data. The Tv_* tools are not affected: they run server-side against your linked Tradovate account.
  • Strategy work is NinjaTrader only. Writing NinjaScript, compiling, backtesting through Strategy Analyzer, parameter sweeps and strategy deployment all depend on NinjaTrader itself, and have no Tradovate equivalent. Tradovate agents trade and read account state; they do not author or backtest strategies.
  • Elite + Add-On v1.13.0+. The Elite gate is enforced at token issuance. REST and WebSocket access remain on Pro, but trading agents on MCP need Elite.
  • Async jobs. Backtests and compiles return a job_id and complete asynchronously. Your agent polls GetMcpJob for progress. Jobs auto-expire after 30 minutes.
  • Live trades are real. MCP tools can submit orders and deploy strategies. Use mcp:trade scope only with agents you trust, and always start your prompts with a safety frame that asks the agent to confirm account, instrument, and risk before any write.

Ready to deploy your first trading agent?

MCP Trading is included with the CrossTrade Elite plan. Plug Claude, ChatGPT, Cursor, or any MCP-capable AI client into NinjaTrader 8 and start running real agents against your real install β€” write, backtest, optimize, deploy, monitor.

NinjaTrader MCP and NinjaScript questions

Desktop strategy work and cloud account tools have different requirements.

Do I need TradingView or Elite to build strategies through MCP?
TradingView is not required for MCP-driven NinjaScript development. CrossTrade MCP calls require Elite, a supported AI client and, for NT8 tools, the connected add-on and running NT8 desktop. Standard webhooks route alerts; Pro provides REST and WebSocket. Neither is the MCP strategy-authoring interface. Check capabilities after connecting rather than treating OAuth login as proof of tool access.
Does a hosted MCP server keep my strategy running when my computer is off?
NinjaScript strategies run in your NinjaTrader 8 installation, so that machine or VPS must remain running and connected. The hosted MCP endpoint is the interface to it. Tradovate Tv_ tools operate linked accounts server-side without NT8, but they do not host NinjaScript or Strategy Analyzer.
How is CrossTrade MCP different from native NinjaTrader MCP?
CrossTrade MCP connects an AI client to your running NinjaTrader 8 desktop through the CrossTrade add-on, including installed NinjaScript, compilation, supported Strategy Analyzer backtests and strategy-state checks. It also exposes linked Tradovate accounts through server-side Tv_ tools. Native NinjaTrader MCP is a separate brokerage-account integration. Choose by the account and workflow you need; CrossTrade MCP requires Elite.
What is an AI trading agent?
An AI trading agent is a program that uses an AI model (Claude, ChatGPT, etc.) to call typed tools, observe results, and decide what to do next. With CrossTrade MCP, the agent's tools include reading account state, pulling market data, writing NinjaScript, compiling it against your real NinjaTrader 8 install, backtesting through NT8's Strategy Analyzer engine, sweeping parameters, deploying strategies, and verifying live state β€” all gated behind permissions you control.
How do I write a NinjaScript strategy with AI?
Connect an MCP-capable AI client (Claude Desktop, Claude Code, Cursor, ChatGPT Pro, etc.) to CrossTrade's hosted MCP server. Ask your agent to describe your hypothesis as NinjaScript. The agent inspects NT8's real symbol surface with LookupNinjaScriptSymbol and GetNinjaScriptHelp, generates C# that matches the local signatures, compiles it in memory with CompileNinjaScript(in_memory:true), and only writes the file with WriteNinjaScriptFile once compile is green. No prior C# experience needed.
Can an AI agent backtest a strategy on NinjaTrader 8?
Yes. RunStrategyBacktest drives NT8's Strategy Analyzer engine for supported configurations on its isolated Backtest account. Match data, dates, trading hours, inputs and fill settings when comparing with the UI. Parameter sweeps are Cartesian; the response reports the fitness used for ranking. The current MCP interface does not enable Tick Replay.
Can my AI agent deploy a live strategy by itself?
Only if you grant the mcp:trade scope and the agent's prompt allows it. Best practice is to gate DeployStrategy behind explicit backtest thresholds (profit factor, max drawdown, trade count) and a human confirmation step. After DeployStrategy, GetDeployedStrategyState returns the live NT8 state so the agent can verify is_trading before claiming success.
Which AI clients work with CrossTrade trading agents?
Any client that speaks the Model Context Protocol (MCP) standard: Claude Desktop, Claude Code, Cursor, Continue, Cline, ChatGPT Pro custom connectors, and others. The CrossTrade MCP endpoint at https://app.crosstrade.io/v1/api/mcp uses Streamable HTTP transport with OAuth 2.1 and dynamic client registration β€” most clients only need the URL.

Connect an AI client

Begin with a read-only trading assistant

MCP connects an AI client to typed tools. It does not turn a model’s answer into a verified account fact or a successful order. Start with observable account data and expand permissions deliberately.

Connect the supported client

Use CrossTrade’s hosted MCP endpoint and the authentication flow documented for your client. MCP access requires Elite. Client support for remote servers and authorization varies, so follow the setup for Claude, ChatGPT or the client you actually use.

Verify the account route

Ask for the linked accounts and open positions before requesting an action. NT8 tools need your add-on connected. Tradovate tools read linked accounts server-side. Require the assistant to name the account and platform it inspected.

Separate proposals from actions

Start with read permissions and a simulation account. If you later grant trading permissions, specify the permitted account and operations. Have the assistant verify returned order state rather than treating a proposed action or an order identifier as a fill.