Code validation

NinjaScript syntax checker MCP for NinjaTrader 8

The Pineify NinjaScript syntax checker MCP runs an external static/API compile check on one complete NinjaTrader 8 Indicator or Strategy source. It returns structured C# and supported NinjaScript API diagnostics without executing the code or changing the source.

MCP tool name
ninjascript-syntax-checker

Example prompt

Use Pineify to check this complete NinjaScript Indicator and explain every diagnostic by row and column.

Direct answer

What ninjascript-syntax-checker does

Send one non-empty code string containing the complete source for a NinjaTrader 8 Indicator or Strategy. The checker accepts up to 524,288 UTF-8 bytes in one request.

The result separates source errors from timeout and system failures. Each source diagnostic contains a row, column, and message for focused review.

This is an external check against a pinned compiler, NinjaTrader reference profile, and compile adapter. It is not the NinjaTrader Editor native compile and does not reproduce generated-wrapper or full custom-library behavior.

Contract

What the agent sends and receives

Inputs

  • One required code string containing the complete source for a single NinjaTrader 8 Indicator or Strategy.
  • The code must contain at least one non-whitespace character.
  • The source can contain at most 524,288 UTF-8 bytes.

Structured output

  • hasError states whether the external check returned one or more source errors.
  • errors contains row, column, and message for each normalized diagnostic.
  • isTimeout states that the checker did not finish within the downstream time limit.
  • isSystemError states that the service or response failed to produce a valid check result.

Capabilities

Where this MCP tool fits

NinjaTrader 8 source checks

Checks C# compiler errors and the NinjaScript API surface supported by the pinned reference profile for one Indicator or Strategy.

Structured diagnostics

Returns each source error with a positive row, column, and diagnostic message.

Explicit failure states

Reports timeout and checker system failures separately from source diagnostics.

Read-only checking

Checks submitted source without editing it, starting NinjaTrader, running a backtest, or placing an order.

Agent workflow

A bounded call from question to review

  1. 1

    Send one complete source

    Give the agent the full Indicator or Strategy source and ask it to call ninjascript-syntax-checker with the code string.

  2. 2

    Check the result state

    Read isTimeout and isSystemError first. Only treat the errors array as conclusive when both flags are false.

  3. 3

    Review source diagnostics

    Use each row, column, and message to revise the working copy, then submit the complete source again.

  4. 4

    Confirm inside NinjaTrader

    After the external check passes, use the NinjaTrader Editor and appropriate simulation or test workflow to validate native compilation and behavior.

Prompt examples

Questions an agent can route to this tool

"Use Pineify to check this complete NinjaScript Indicator and explain every diagnostic by row and column."
"Run ninjascript-syntax-checker on this complete NinjaTrader 8 Strategy source. Do not execute or change the code."
"Check this NinjaScript source, then separate source errors from timeout or system failures."

Operator notes

How I review the result

I send the complete Indicator or Strategy source so the returned row and column positions match my working copy.

I review the earliest useful diagnostic first because one C# syntax error can affect later compiler messages.

I treat a clean external result as a reason to continue with NinjaTrader Editor validation, not as proof of native compilation or trading behavior.

Boundaries to keep in the prompt

  • The tool accepts one source file per request. It does not accept a project, multiple files, custom references, compiler switches, #r, #load, #line, or #pragma checksum directives.
  • The checker uses a pinned external compiler, NinjaTrader reference profile, and compile adapter. It does not reproduce NinjaTrader Editor generated wrappers or compile the full custom-script library.
  • The tool does not execute code, start NinjaTrader, access market or broker data, run a backtest, connect to an account, or place orders.
  • A clean result does not prove lifecycle behavior, trading logic, risk controls, native compilation, or future performance.
  • The remote checker receives the submitted source. Review your code-sharing policy before sending proprietary NinjaScript code.

Pineify MCP is an information and code-validation tool, not investment advice. It does not promise returns, place trades, or modify a portfolio. Review timestamps, source fields, code diagnostics, and risk assumptions before acting.

FAQ

NinjaScript syntax checker MCP for NinjaTrader 8 questions

Add ninjascript-syntax-checker to your AI workflow

Connect one remote Pineify MCP endpoint, then let your compatible AI client discover this tool with the rest of the read-only catalog.

Open MCP setup