Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90


What are the ways to make a Ninja Trade BOT using C# language

  • Filter
  • Time
  • Show
Clear All
new posts

    What are the ways to make a Ninja Trade BOT using C# language

    What others possibilities to use C# with Ninja Trader

    Hello ryangvail1,

    Thanks for your post.

    The Strategy Builder (New > Strategy Builder) or the NinjaScript Editor window (New > NinjaScript Editor) could be used to create custom NinjaScript add-ons such as indicators or strategies.

    The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder, you can set up conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

    Here is a link to our publicly available training videos, 'Strategy Builder 301' and 'NinjaScript Editor 401', for you to view at your own convenience.

    Strategy Builder 301 —

    NinjaScript Editor 401 -

    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:

    If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our help guide first:

    And the MSDN (Microsft Developers Network) C# Language Reference.

    Please let us know if we may further assist.​
    Brandon H.NinjaTrader Customer Service


      Is there any way to use a separate program instead of add-on?
      For example on GAIN API. I can use separate program and I can use Nuget Package.


        Sure. Probably. Maybe.
        It depends how skilled you are.

        If you are familiar with other .NET languages, and know
        what an assembly is, and know how to produce them in
        your preferred language (typically, via Visual Studio),
        then, sure, the world is your oyster. Probably.

        But doing so is an extremely advanced topic, and entirely
        unsupported by the NT support team.

        That doesn't mean it can't be done, it just means NT
        support (and their help guides) will offer you little to no
        assistance -- aka, you're on your own.


        If you really mean a separate executable program, then
        you're probably talking about the DLL interface, which has
        a reputation for being rather limited.

        Writing an Addon (or Indicator/Strategy) offers many benefits
        that are not comparable to integrating a separate program
        that uses the DLL interface.

        That is, IMHO, if you need the DLL interface, then you are
        working in an entirely different problem domain than what
        the standard Addon/Strategy/Indicator plugin architecture
        is designed to solve.

        Other external interfaces do exist, such as the File Interface.

        Before asking about a separate program, you should really
        define what it is you wish to achieve.

        Just my 2˘.

        Last edited by bltdavid; 01-23-2023, 06:17 AM.


          Hello ryangvail1,

          Thanks for your note.

          As bltdavid has said, using an external application for programming custom NinjaScripts is not supported by our Support department. External applications should be used at your own discretion.

          It is suggested to use the Strategy Builder or NinjaScript Editor window for programming custom NinjaScripts as these are supported by our Support team.

          If you are looking for a NinjaTrader API to use, NinjaTrader does have an API available as a C# managed and unmanaged assembly. Support for the API is very limited.

          The Application Programming Interface (API) is available in the NTDirect.dll (unmanaged) and NinjaTrader.Client.dll (managed) files for you to use in an external application to interface with NinjaTrader. These two files provide the same functions, however, you may find the NinjaTrader.Client.dll is easier to reference in your custom application.

          Please note the NTDirect.dll (unmanaged) currently does not work on NinjaTrader 8 version and our Developers are working on a fix for this.

          Support for the API is limited from NinjaTrader Support. We are not able to assist with any code in an application external to NinjaTrader. We are able to detail the usage of any methods available from the API.

          Below I am providing a publicly available link to the help guide that lists the functions available to the API.

          Help Guide NT8 API functions -

          Please also refer to this forum post link for more information about the NinjaTrader API —

          On the forum, you can ask other developers in the community if anyone has tips for unsupported external application code.

          Please let us know if we may assist further.​​
          Brandon H.NinjaTrader Customer Service


          Latest Posts


          Topics Statistics Last Post
          Started by traderzoso, 12-27-2020, 05:19 PM
          6 responses
          Last Post lekor
          by lekor
          Started by ETFVoyageur, 05-18-2024, 12:45 AM
          4 responses
          Last Post NinjaTrader_BrandonH  
          Started by Skifree, Today, 11:47 AM
          4 responses
          Last Post NinjaTrader_Jesse  
          Started by molecool, Today, 01:48 PM
          1 response
          Last Post NinjaTrader_Jesse  
          Started by ETFVoyageur, Today, 12:26 PM
          3 responses
          Last Post NinjaTrader_ChelseaB