• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pre-Complier Errors With Indicator Wizard Generated Code

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

    Pre-Complier Errors With Indicator Wizard Generated Code

    With NT7, I'm getting pre-complier errors with Indicator Wizard generated code. Error lists: CS1502, NT1503, CS1502, CS1503, CS0103, CS0103. Invalid arguments. Line numbers starting in Properties areas and going lower.

    I've also tried loading library indicators into the editor, saving them as new file name, and running the complier. Same errors.

    What's causing this? I don't have this complier problem with Strategies, just with Indicators.
    Last edited by borland; 07-26-2016, 11:26 AM.

    #2
    Hello Borland,

    May we have a screenshot of the error messages?
    (please fully expand the error column so that we may read the error message)

    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 screenshot 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
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      See the attached screenshot.
      Attached Files

      Comment


        #4
        Hello borland,

        You have errors in two files that are not in this script.
        One file is an indicator that starts with MyCustomIn (I am not able to read the full name of the indicator). The strategy starts with MyCustomSt (again I am not able to read the full name).

        It looks like you have attempted to use a double where a data series should be in the indicator.

        With the strategy, I'm not entirely sure. It mentions the Add() but also mentions Lines. I think there may be multiple errors in the strategy. But I would start with the Add() call in Initialize(). With Add() you can add a secondary series to the script or you can add an indicator to a chart. If you are trying to add lines or plots to a strategy this will not work by using the Add() call.

        What code is on line 55 of the indicator as shown in the error messages?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I've attached the Custom Indicator files. I have made no changes. One is Wizard generated code. The other is a duplicate of the EMA indicator in the Library. Again, no code changes were made, only file name is different.
          Attached Files

          Comment


            #6
            Hello borland,

            This indicator appears OK, though I can't be certain this is the script with the error... (I was not able to read the full file name in the screenshot of the error message you posted)

            Where is the strategy?

            The one that starts with MyCustomSt that is shown in the error messages?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I clicked on that error code and it opened the NT strategy script file in another editor window. After commenting out the Add(... MyIndicator) to remove any compile errors in the Strategy file, the Indicator files now compile without errors.

              I'm not sure how/why NT complier got hung up with these unrelated files. That Strategy wasn't opened in any workspace or editor. The file names are different (MyCustomIndicator or MyCustomEMA) than the MyIndicator name used in the Strategy.

              Thanks for the help.

              Comment


                #8
                Hello borland,

                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 basically true of all C# projects and done to give you the highest runtime performance possible and to ensure that it is not possible to call a script that has not been compiled.

                I recommend watching the NinjaScript Editor webinar which covers understanding the error message colors and filenames.
                https://www.youtube.com/watch?v=K8v_...tu.be&t=30m20s
                Last edited by NinjaTrader_ChelseaB; 07-26-2016, 02:39 PM.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by tcfcigvo, Yesterday, 11:39 PM
                0 responses
                4 views
                0 likes
                Last Post tcfcigvo  
                Started by BobbyWan, Yesterday, 09:15 PM
                0 responses
                9 views
                0 likes
                Last Post BobbyWan  
                Started by trader14, Yesterday, 08:23 PM
                0 responses
                2 views
                0 likes
                Last Post trader14  
                Started by ares5918, Yesterday, 02:37 PM
                2 responses
                17 views
                0 likes
                Last Post ares5918  
                Started by RTR1701, 11-15-2016, 11:38 AM
                22 responses
                1,267 views
                0 likes
                Last Post afcmaff
                by afcmaff
                 
                Working...
                X