A comprehensive, LLM-ready knowledge base of the NinjaTrader Desktop SDK documentation for building indicators and strategies with AI coding assistants.
| Folder | Contents | Files |
|---|---|---|
docs/ |
Complete API reference | 1168 |
education/ |
Learning resources & tutorials | 1 |
best-practices/ |
NinjaScript coding guidelines | 1 |
Total: 1170 documentation pages
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.
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.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` - TutorialsOr use the instructions field in your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"instructions": ["./path/to/ninjatrader-kb/CLAUDE.md"]
}Point your AI assistant to this directory. The index.json file contains a machine-readable index of all pages.
docs/indicator.md- Base class overviewdocs/onstatechange.md- Lifecycle managementdocs/onbarupdate.md- Calculation logicdocs/addplot.md- Adding visual plotsbest-practices/index.md- Coding standards
docs/strategy.md- Base class overviewdocs/managed_approach.md- Order managementdocs/enterlong.md,docs/entershort.md- Entry methodsdocs/setstoploss.md,docs/setprofittarget.md- Risk management
All documentation files in docs/ use a flat structure with filenames derived from the original URL:
enterlong.md← fromhttps://developer.ninjatrader.com/docs/desktop/enterlongmoving_average_simple_sma.md← fromhttps://developer.ninjatrader.com/docs/desktop/moving_average_simple_smaonstatechange.md← fromhttps://developer.ninjatrader.com/docs/desktop/onstatechange
Contributions are welcome! Please feel free to submit a Pull Request.
If this project helped you, consider supporting its development:
- PayPal
- BTC:
18gT1wmq3RMoLBm2ZFv4PhiYbU5CMAQC6P
- NinjaTrader Official Website
- NinjaTrader Developer Documentation
- GitHub Repository
- MCP Server on npm
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