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


HELP... Ninjatrader can't compile a new strategy

  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_ChelseaB
    Hello Mykro,

    Please follow the instructions below to see where the errors are coming from after compiling an indicator in NinjaTrader 8. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
    • Open NinjaTrader
    • From the Control Center click the New menu -> select NinjaScript Editor
    • On the right open a script such the Indicators -> ADL script
    • Right click in the window and select Compile to compile all scripts
    • At the bottom of the window a new section will appear where you can find the error locations.
    • From there you have the option to comment out offending code sections, correct references, remove the complete indicator, or debug it to be able to compile again.
    If you are unsure as to what the error is indicating, please send me a screenshot of the error with the error column fully expanded so that I may read the entire error message.
    (Click and drag on the small faint separator between column heads to expand that column)

    To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
    Click here for detailed instruction

    Please let me know if you would like assistance resolving the error or if you are not using the latest version of NinjaTrader.

    Leave a comment:

  • casabella
    In C# the strategy will not compile if it has an error anywhere in the code. In order to compile, you must fix the error which should be in the bottom of the Editor giving you the line of code that has the error. Worst case scenario if you do not know how to fix it but would like to compile the code so that it saves the rest what you need to do is comment it out. Just place the comment marks // before the line of code and try to compile again.

    This does not fix the error but it makes the Editor look at it like it is a developer note and ignore it.

    Leave a comment:

  • bltdavid
    Can you attach a screenshot of the error?

    Leave a comment:

  • Mykro
    started a topic HELP... Ninjatrader can't compile a new strategy

    HELP... Ninjatrader can't compile a new strategy

    Hello.. I'm new to Ninjatrader.. I started a new build for a strategy and when I click to Finish an error box pops up and it says it can't compile. I wrote the stategy three times and no success... I don't know how to fix it..

    Thanks Michael

Latest Posts


Topics Statistics Last Post
Started by Albertmanly, Today, 08:51 AM
0 responses
Last Post Albertmanly  
Started by Spiderbird, 10-03-2022, 10:15 PM
6 responses
Last Post NinjaTrader_ChelseaB  
Started by Marble, 09-02-2022, 12:24 PM
29 responses
Last Post NinjaTrader_Jesse  
Started by music_p13, Today, 08:45 AM
0 responses
Last Post music_p13  
Started by b16_aln, Today, 06:33 AM
3 responses
Last Post NinjaTrader_ChelseaB