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

Indicator failing to compile

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

    Indicator failing to compile

    Hello,

    I am new to Ninja trader script writing.
    I wrote attached moving average crossover strategy which is very simple, but doesn't compile.
    Please help.
    thanks,
    Attached Files

    #2
    Hello alisidd,

    Thanks for your post and welcome to the forums!

    When you compile, the Ninjascript editor will list error messages at the bottom of the code window. In NinjaTrader, all Ninjascript (indicators/strategies/etc..) are all compiled together, so an error in any file will be shown in the file that is open.

    In the left column of the error messages will be the name of the file that contains the error. If the name does not match your strategy file name then the error is not within the strategy you posted.

    You will need all of your (files) code to be correct before the system can successfully compile. If you have created a file that is causing compilation issues and the file is no longer needed you can remove it from the folder, then open another strategy or indicator and compile to see if that resolves the error.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Indicator failing to compile

      Hi,

      Thanks for your prompt reply.
      I actually followed this video

      With Ninjatrader Wizard we can create Strategies and Indicators with a graphic user interface very powerful that allows to define complex rules very fast and...


      and expected it to compile without any errors.

      Now I can't figure out why it's not compiling.

      Any help will be appreciated.

      Comment


        #4
        Hello alisidd,

        Thanks for your post.

        As I tried to advise, the issue may not be with what you created but with another file.

        Please follow the instructions below to see where the errors are coming from after compiling the indicator. 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.

        For NinjaTrader 7:

        Open NinjaTrader
        From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
        Select ANY indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
        A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
        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, 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 NinjaScript File column and Error column fully visible (not to be confused with the Code column)

        To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        23 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        21 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X