Skip to content

oransel/ninjatrader-ninjascript-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NinjaTrader NinjaScript Knowledge Base

A comprehensive, LLM-ready knowledge base of the NinjaTrader Desktop SDK documentation for building indicators and strategies with AI coding assistants.

What's Included

Folder Contents Files
docs/ Complete API reference 1168
education/ Learning resources & tutorials 1
best-practices/ NinjaScript coding guidelines 1

Total: 1170 documentation pages

Quick Start

Option 1: MCP Server (Recommended)

Use the MCP server for dynamic, on-demand access to the documentation:

{
  "mcpServers": {
    "ninjatrader": {
      "command": "npx",
      "args": ["-y", "ninjatrader-ninjascript-mcp"]
    }
  }
}

Add this to your MCP config file:

Tool Platform Config Path
Kiro macOS/Linux ~/.kiro/settings/mcp.json
Kiro Windows %USERPROFILE%\.kiro\settings\mcp.json
Claude Desktop macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop Windows %APPDATA%\Claude\claude_desktop_config.json
Claude Desktop Linux ~/.config/Claude/claude_desktop_config.json

The MCP server provides tools to search docs, get specific pages, and follow recommended workflows.

Option 2: Static Files

Claude Code / Kiro

Copy CLAUDE.md to your project root, or add this to your existing CLAUDE.md:

## NinjaTrader Docs
Full SDK reference is in ./path/to/this/repo/. When writing NinjaScript,
consult the relevant .md files for accurate API signatures and examples.

OpenCode

Add the knowledge base path to your AGENTS.md file:

## NinjaTrader Documentation
When working with NinjaScript, reference the documentation in ./path/to/ninjatrader-kb/.
- `docs/` - API reference
- `best-practices/index.md` - Coding standards
- `education/index.md` - Tutorials

Or use the instructions field in your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["./path/to/ninjatrader-kb/CLAUDE.md"]
}

Other AI Tools

Point your AI assistant to this directory. The index.json file contains a machine-readable index of all pages.

Example Files for Common Tasks

Building Indicators

  • docs/indicator.md - Base class overview
  • docs/onstatechange.md - Lifecycle management
  • docs/onbarupdate.md - Calculation logic
  • docs/addplot.md - Adding visual plots
  • best-practices/index.md - Coding standards

Building Strategies

  • docs/strategy.md - Base class overview
  • docs/managed_approach.md - Order management
  • docs/enterlong.md, docs/entershort.md - Entry methods
  • docs/setstoploss.md, docs/setprofittarget.md - Risk management

File Structure

All documentation files in docs/ use a flat structure with filenames derived from the original URL:

  • enterlong.md ← from https://developer.ninjatrader.com/docs/desktop/enterlong
  • moving_average_simple_sma.md ← from https://developer.ninjatrader.com/docs/desktop/moving_average_simple_sma
  • onstatechange.md ← from https://developer.ninjatrader.com/docs/desktop/onstatechange

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If this project helped you, consider supporting its development:

  • PayPal
  • BTC: 18gT1wmq3RMoLBm2ZFv4PhiYbU5CMAQC6P

Links

License

Copyright (c) 2026 Mustafa Oransel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Note: The documentation content in this repository is sourced from NinjaTrader's official developer documentation. Please refer to NinjaTrader's terms of use regarding the use of their documentation.


Last updated: 2026-06-20

About

A comprehensive, LLM-ready knowledge base of the NinjaTrader Desktop SDK documentation for building indicators and strategies with AI coding assistants.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors