Announcement

Collapse

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

Collapse

Compile NinjaScript in Visual Studio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Compile NinjaScript in Visual Studio

    I apologize if this information has been posted elsewhere, but I wasn't able to find it searching the forum. I personally prefer Visual Studio to the NinjaScript Editor, and it turns out to be pretty easy to substitute.

    Aside from the code highlighting and intellisense differences, it's easier to debug when you're not switching back to the NinjaTrader Editor to compile each change.

    1) Navigate to "Documents\NinjaTrader 6.5\bin\Custom\"

    2) Open the "NinjaTrader.Custom.csproj" project in Visual Studio.

    3) Add to the project any .cs files you've produced that are located in the "Strategy" and "Indicator" directories.

    4) You will need to remove the references to "NinjaTrader.Core" and "WilsonORMapper", and add them as .DLL references (both are located in "Program Files\NinjaTrader 6.5\bin")

    5) This project now compiles to "NinjaTrader.Custom.dll". After you compile the project, however, NinjaTrader still won't be aware of any changes because it has to reload the library. To accomplish that, I found it is easiest to just create an empty indicator in the NinjaTrader Editor and compile it each time you compile the VS project.

    I've only been using NinjaTrader for a few days, so it's likely this isn't the most optimal way to use VS, but I will post any refined methods to this thread.

    #2
    marc.newlin,

    Thank you for the post. The only information we offer in terms of using VS is listed here: http://www.ninjatrader-support.com/H...ualStudio.html
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      marc,

      See this thread http://www.ninjatrader-support2.com/...ad.php?t=14027

      Comment


        #4
        hemlock,

        Thank you for referring me to the other thread.

        Comment


          #5
          Thanks marc for the tip on the .csproj file and configuration. Much better experience for me as I'm in VS2008 all the time. Adding a macro button to attach to NinjaTrader.exe and I'm all set!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by algospoke, 04-17-2024, 06:40 PM
          6 responses
          49 views
          0 likes
          Last Post algospoke  
          Started by arvidvanstaey, Today, 02:19 PM
          4 responses
          11 views
          0 likes
          Last Post arvidvanstaey  
          Started by samish18, 04-17-2024, 08:57 AM
          16 responses
          61 views
          0 likes
          Last Post samish18  
          Started by jordanq2, Today, 03:10 PM
          2 responses
          11 views
          0 likes
          Last Post jordanq2  
          Started by traderqz, Today, 12:06 AM
          10 responses
          21 views
          0 likes
          Last Post traderqz  
          Working...
          X