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 Error

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

    Compile Error

    I'm brand new at creating indicators. I used the New Indicator Wizard and pressed the "Generate" button to look at the code. Without changing anything I compiled the default code. It resulted in errors in line 51 which is in the Properties section:

    Indicator\rangeStpHi.cs Invalid expression term '['
    Indicator\rangeStpHi.cs ) expected
    Indicator\rangeStpHi.cs ; expected
    Indicator\rangeStpHi.cs Invalid expression term ')'
    Indicator\rangeStpHi.cs ; expected

    I assumed that the default indicator would compile and then I could start to add the code I wanted. What am I missing?

    Thanks,

    #2
    Um, show us the complete line of code and maybe we can be of more help?

    From the look of the errors you used a [ where you wanted a (

    Comment


      #3
      Hi Newshues,

      This is the line of code that that the indictor wizard installs and causes a compile error:


      [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove


      Thanks

      Comment


        #4
        Hi Newshues,

        I think I must have another problem. I tried to compile a couple of the indicators that are are installed with NT and I get the same compile errors. Could my installation to NT be corrupteed?

        Thanks,

        ramckay

        Comment


          #5
          You'll get the compile error until the bug code is fixed no matter what you compile. Ninja attempts to compile everything changed when you compile.

          Perhaps you're missing a } above the line the gives the error.

          Comment


            #6
            Hi Newshues,

            I know I'll get a compile error for errors. My question is "Is the line of code correct?" My editor is giving me the same error on indicators that NT installed and run OK when I open and try to compile them , same as the example that I posted which is from the boiler plate code that the Indicator Wizard creates when you add nothing to the Wizard and select "Generate."

            Thanks,

            ramckay

            Comment


              #7
              Hi ramckay, the line of posted code is correct, but since all your files are compiled the error could be present in a different file. Just doublelclick on each error listed and debug them until the files compile.

              Here are tips how to effectively debug your NinjaScript studies - http://www.ninjatrader-support2.com/...ead.php?t=4678
              BertrandNinjaTrader Customer Service

              Comment


                #8
                HI Bertrand,

                That solved the problem. Didn't even catch the information that a different indicator was causing the problem - duh.

                Thanks,

                ramckay

                Comment


                  #9
                  You are welcome, this due to compiling all studies in one assembly for maximum performance...

                  If you are working on some script just comment all out and it will compile fine still.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by nleitman, Yesterday, 11:46 AM
                  16 responses
                  43 views
                  0 likes
                  Last Post nleitman  
                  Started by MSerag, Yesterday, 11:52 PM
                  3 responses
                  23 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by dcriador, Yesterday, 01:43 AM
                  6 responses
                  27 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by James650, Today, 08:25 AM
                  1 response
                  2 views
                  0 likes
                  Last Post NinjaTrader_ChristopherJ  
                  Started by Rogers101, 05-05-2024, 11:30 AM
                  14 responses
                  40 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X