Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GridCategory Suggestion for 6.5

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

    #16
    eDanny,

    Every discussion till now has been about making parameters. Parameters are expected to show on grids and as such need to use GridCategory instead of Category. Your use-case is a different scenario.
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      Originally posted by NinjaTrader_Josh View Post
      eDanny,

      Every discussion till now has been about making parameters. Parameters are expected to show on grids and as such need to use GridCategory instead of Category. Your use-case is a different scenario.
      Ok thanks. Dan
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #18
        Originally posted by NinjaTrader_Josh View Post
        eDanny,

        I believe you can filter it by overriding the ToString() method.

        cassb,

        Can you provide a quick sample to demonstrate the issue? This way we will be able to see all the relationships of your code. Thank you.
        Here is the sample. I also attached a screen shot of the error I'm getting. There must be some .cs file somewhere that's messing it up, but I don't know what.
        Attached Files

        Comment


          #19
          cassb, you need to use this in the Variables instead:

          private Test myInput0 = Test.One;

          or Test.Two or Test.Three, whichever is the default.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #20
            Originally posted by eDanny View Post
            cassb, you need to use this in the Variables instead:

            private Test myInput0 = Test.One;

            or Test.Two or Test.Three, whichever is the default.

            Oops... sorry. Here's the new version with the correct Variable declaration. It still doesn't compile.
            Attached Files

            Comment


              #21
              Any ideas? I migrated these indicators using Export from v6.5 and Import in v7.0, so everything should have imported correctly, although I did tell it to not import the @Min.cs, @Max.cs, etc. files since I thought they might be updated in v7.

              Comment


                #22
                here you go

                attached version compiles!
                You must clarify your concept of C#. The error had nothing to do with Ninja.

                regards
                andreas



                p.s.

                if you do

                #if NT7
                [GridCategory("Parameters")]
                #else
                [Category("Parameters")]
                #endif

                the same code will compile on either NT65 or NT7
                Attached Files
                Last edited by zweistein; 04-14-2010, 03:13 AM.

                Comment


                  #23
                  Zweistein

                  Yes that's what I do.
                  You can also do it for say

                  #if NT7
                  X = ChartControl.GetXByBarIdx(BarsArray[0],CurrentBar);
                  #else
                  X = ChartControl.GetXByBarIdx(CurrentBar) ;
                  #endif

                  Comment


                    #24
                    Originally posted by Mindset View Post
                    Yes that's what I do.
                    You can also do it for say

                    #if NT7
                    X = ChartControl.GetXByBarIdx(BarsArray[0],CurrentBar);
                    #else
                    X = ChartControl.GetXByBarIdx(CurrentBar) ;
                    #endif

                    Oh, that's fantastic -- I would love to only have one version of code to support. Thanks, I'll try it.

                    But still, I do have a problem with the "enum" command for some reason. When I change from Category to GridCategory, I'm still getting the error message that I posted above. Either something is missing or there's some script or something that is causing the error on my PC only. How do I track this down?

                    Comment


                      #25
                      @cassb

                      I see that you did not download the file from #22, which contains the solution to your problem. (Filename is same as before, but content is different)

                      regards

                      Andreas

                      Comment


                        #26
                        Originally posted by zweistein View Post
                        @cassb

                        I see that you did not download the file from #22, which contains the solution to your problem. (Filename is same as before, but content is different)

                        regards

                        Andreas

                        Oh...I see what you did now. You put the enum into its own namespace? Is that required in NT7 now? But yes, your version does compile on my computer now. Thank you!

                        Comment


                          #27
                          Believe you should have always put the enums outside.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #28
                            Originally posted by NinjaTrader_Josh View Post
                            Believe you should have always put the enums outside.
                            Well, what I had working OK in v6.5 was all my enums were in the Properties region of each indicator. Now in v7.0, something has changed that does not allow this any more. However, putting enums into their own namespace then basically 'removes' them from the specific routine and makes them global. So that I will need to distribute a dummy routine with just all the enumerators in it along with any one or more of the indicators. That's kinda of a pita. Is there a better way to do this so that enums can be declared locally in each indicator routine instead?

                            Thanks!

                            Comment


                              #29
                              Unfortunately this is not supported. I don't believe this was ever recommended to be done in the manner you mentioned for 6.5 either.
                              Josh P.NinjaTrader Customer Service

                              Comment


                                #30
                                Originally posted by NinjaTrader_Josh View Post
                                Unfortunately this is not supported. I don't believe this was ever recommended to be done in the manner you mentioned for 6.5 either.
                                OK. Can you point me to a page or a keyword I can look up that deals with distributing a dummy routine like this with compiled indicators? Could I create a DLL for this routine and have it automatically made a reference or something when the user imports the zip file?

                                Thanks, Josh!

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                615 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                357 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                561 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                566 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X