Introduction

View as Markdown

Welcome to the NinjaTrader NinjaScript Documentation. This comprehensive guide is designed to help you harness the full power of NinjaScript, NinjaTrader’s powerful C#-based trading programming language. Whether you’re looking to develop custom indicators, automate trading strategies, or create new trading tools, this documentation will provide you with the knowledge and resources to bring your ideas to life.

What is NinjaScript?

NinjaScript is a robust programming language built on C# that allows you to create custom technical indicators, strategies, drawing tools, and more within the NinjaTrader platform. It offers a rich set of classes and methods specifically tailored for financial market analysis and trading system development.

Why Develop with NinjaScript?

By developing with NinjaScript, you can:

  • Customize Your Trading Experience: Tailor the NinjaTrader platform to fit your unique trading style and strategies.
  • Automate Trading Strategies: Develop automated systems that execute trades based on predefined criteria.
  • Create Advanced Indicators: Build proprietary indicators to gain deeper insights into market movements.
  • Enhance Efficiency: Automate repetitive tasks and streamline your trading workflow.

What You’ll Learn

In this documentation, you’ll discover:

  • Getting Started with NinjaScript: Setting up your development environment and understanding the basics.
  • Creating Custom Indicators: Developing indicators that analyze market data and provide visual cues.
  • Building Automated Strategies: Crafting strategies that execute trades automatically based on your algorithms.
  • Advanced Programming Concepts: Exploring topics like optimization, backtesting, and performance considerations.
  • Debugging and Testing: Utilizing debugging tools to test and refine your code for optimal performance.
  • Best Practices: Guidelines to write efficient, maintainable, and robust NinjaScript code.

Prerequisites

To get the most out of this documentation, you should have:

  • Basic Understanding of C#: Familiarity with C# programming will help you grasp NinjaScript concepts more effectively.
  • NinjaTrader Platform Installed: Ensure you have the NinjaTrader Desktop platform installed on your computer.
  • Access to Development Tools: We’ll guide you on how to use the NinjaScript Editor and other essential tools within NinjaTrader.

Getting Started

Ready to embark on your NinjaScript development journey? Start with our beginner-friendly tutorials and gradually progress to more advanced topics. Here’s how to begin:

  1. Set Up Your Environment: Learn how to access the NinjaScript Editor and configure your settings.
  2. Understand the Basics: Familiarize yourself with the NinjaScript architecture, syntax, and key concepts.
  3. Create Your First Indicator: Follow a step-by-step guide to build a simple custom indicator.
  4. Explore Sample Code: Access a library of sample scripts to learn from practical examples.

Support and Resources

We’re here to support you every step of the way: