Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader editor checks outcommented code.

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

    NinjaTrader editor checks outcommented code.

    This is absolutely incredible. The indicator below has outcommented code in the Properties region and NinjaTrader refuses to compile this because it cannot find the definition for the outcommented properties.

    Attached Files

    #2
    Harry, I could not reproduce on simple test indicator with commenting out in the Properties region, have you copied over to a new indicator to force regeneration of the NS wrappers already?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      I had added the test indicator Offensive.cs below. Even if I rename the indicator, it does not compile, because NT checks for the outcommented code.

      It could not been exported, so I saved it as Offensive.cs -> to import you would have to copy it to the NT directory bin -> indicator manually and then edit it from within NT7 to compile it, but it does not compile, because of the outcommented code!

      Comment


        #4
        Harry,

        You can't just comment it and expect the wrappers to be proper when you were already in an uncompilable state. You need to uncomment the section, fix the code so it can compile, compile, then you can comment the code section now and get properly generated wrappers.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Let us take a different approach. Here is a compilable indicator that I exported with NT7. So you can import it via File -> Utilities -> Import NinjaScript

          If you outcomment lines 833 to 952 which are not mandatory, you will get an error produced by the NinjaScipt generated code. Why???
          Attached Files
          Last edited by Harry; 06-03-2010, 02:53 PM.

          Comment


            #6
            Harry,

            Your new file compiles fine on my end even with commenting that section out, just like how the old file worked once I recompiled and regenerated the wrappers by returning it to a compilable state. Once returned to a compilable state, commenting things in the Properties region worked with no problem in the wrappers.

            If you are editing your files outside of the NinjaScript Editor this is not supported. Please be sure to compile within the NinjaScript Editor. Please also be sure to not have the Debug Mode setting checked when you compile.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Josh, I do not understand.

              I only use the NinjaTrader Editor. The file works fine here. If I comment that section out, I get a bunch of error messages as shown below and it does not compile.

              Debug mode was not active.

              See error messages below, all errors from NinjaTrader generated code.

              Commenting out with "/*" and "*/" in lines 833 and 952.
              Attached Files
              Last edited by Harry; 06-03-2010, 03:19 PM.

              Comment


                #8
                Please try commenting your section with //. Forwarded your use of /* */ to development.

                You can just select the lines you want and press the Comment selection button up top.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Glad you could reproduce.

                  I was not aware of the other way to comment out. No problem when selecting the lines and using the icon on top to comment out the selection.

                  Comment


                    #10
                    Development says this is unfortunately just the way it will work. You will not be able to use /* */ to comment those out.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Two remarks:

                      - Outcommenting is part of C#, you are violating C# syntax.
                      - If I am not able to outcomment with "/*" and "*/", then the editor should not change the colour to green and confirm that it was outcommented.
                      - With NT 6.5 there was no problem, as I permanently used this way to outcomment (have made some tests now as well).

                      I do not think that it can be left this way.

                      Comment


                        #12
                        To clarify, you can use /* */, just not in the Properties region. This requirement is the same in 6.5 and 7.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Once I know this, it is no problem for me, but I believe that there are numerous other users of NT who will be confused. So it should be well documented in the help file.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by sofortune, 05-18-2024, 11:48 AM
                          2 responses
                          31 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Started by Zach55, 02-19-2024, 07:22 PM
                          2 responses
                          65 views
                          0 likes
                          Last Post lbadisa1  
                          Started by JGriff5646, Yesterday, 05:47 PM
                          1 response
                          14 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Started by AlphaOptions, 06-18-2013, 08:24 AM
                          9 responses
                          2,203 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by ttrader23, Yesterday, 09:33 AM
                          3 responses
                          27 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Working...
                          X