Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GridCategory, design or bug?

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

    GridCategory, design or bug?

    Hello,

    using sampleMACrossover strategy
    I changed the Parameters Category from
    [GridCategory("Parameters")] to [Category("Parameters")]

    from other code I access the Edit Strategy Dialog and I use PropertyGrid.SelectedObject.Parameters.
    This is the list of parameters for the strategy and there are 2 , fast and slow.

    Using The "GridCategory", 2 parameters are correctly in the list.

    Using "Category" however the parameters are listed double, hence I see 4 parameters, 2 with name Fast and 2 with name Slow.

    It seems that your code lists the parameters two times, one time for the category "Category" and a second time for a categry "GridCategory" which seems to be generated internally.

    Is this expected behaviour?

    Andreas

    Then in Strategy.Parameters I get

    #2
    As per NT7 you only should use "GridCategory" and NOT "Category". Please let us know if there would be an issue by ONLY using "GridCategory". Thanks

    Also: Not sure what you mean by "I access the Edit Strategy Dialog and I use PropertyGrid.SelectedObject.Parameters". Unfortunately we are unable to provide support code custom coding outside NinjaScript.

    Comment


      #3
      I have not seen what the effects are if we do not change this when moving our indicators from v6.5 to v7.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        This is for clarity. Please change your implementation accordingly to make sure you or your users don't experience unwanted effects.

        Comment


          #5
          Again, there have been no 'unwanted' effects explained to us yet. Could we have a list of what might happen?
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            'GridCategory("<WhatEverText>")' explicitely marks the parameters for indicators/strategies. Formerly you had to have 'Category("Parameters")' and nothing else was supported.

            -> you now can group your indicator/strategy parameters

            Comment


              #7
              OK thanks Dierk, this was done for the benefit of Strategies then.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                As well as indicators.

                Comment


                  #9
                  So are you saying that although the settings were able to be grouped in indicators before, settings not in the Parameters section were not settable when accessing from another indicator but they are now somehow?
                  eDanny
                  NinjaTrader Ecosystem Vendor - Integrity Traders

                  Comment


                    #10
                    Here is what I'm saying:
                    - having anything else than 'Category("Parameters")' in NT6.5 was not supported neither on strategies nor indicators since it had some unwanted effects which you probably haven't been aware off
                    - I don't have a list of these issues related at hand, but that is irrelevant since they had been there which made us changing the logic
                    - using NT7 you should replace 'Category' by 'GridCategory'

                    Hope this ultimately clarifies the issue.

                    Comment


                      #11
                      Thanks, I didn't know this was not previously supported in indicators since it was done all the time.
                      eDanny
                      NinjaTrader Ecosystem Vendor - Integrity Traders

                      Comment


                        #12
                        In my code I replaced

                        new System.ComponentModel.CategoryAttribute("Parameter s")

                        with
                        new NinjaTrader.Data.GridCategoryAttribute("Parameters ")

                        not sure yet for the double display, some mistery in the debugging, recompiling, etc. cycle. My debugger was running for several hours without exit, and there was a timing issue with a context menu which needed more time to be populated by Ninja (Edit Strategy) than I expected.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        607 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        353 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
                        560 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        561 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X