Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GroupName Ordering

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

    GroupName Ordering

    I have parameters with three group names
    [Display(Name = "whatevernameZ", Order = 1, GroupName = "C")]
    [Display(Name = "whatevernameY", Order = 2, GroupName = "A")]
    ​[Display(Name = "whatevernameX", Order = 3, GroupName = "B")]

    In the Inidcator Properties UI panel they get sorted accoording to the Group Name, First A, then B, then C.
    In other words the GroupName alphabetical order determines the actual order on the UI and the Order number gets' ignored

    Ho do I force the order of the GroupName to be first Group C, then A, then B ?

    Thank you.
    G




    #2
    Hi giogio1,

    Please refer to the code below:

    Code:
    namespace NinjaTrader.NinjaScript.Indicators {
        [Gui.CategoryOrder("C", 1)]
        [Gui.CategoryOrder("A", 2)]
        [Gui.CategoryOrder("B", 3)]
    
        public class MyCustomIndicator11111 : Indicator {
    
            #region Properties
            [Range(0, int.MaxValue), NinjaScriptProperty]
            [Display(Name = "whatevernameZ", Order = 1, GroupName = "C")]
            public int whatevernameZ { get; set; }
    
            [Range(0, int.MaxValue), NinjaScriptProperty]
            [Display(Name = "whatevernameY", Order = 2, GroupName = "A")]
            public int whatevernameY { get; set; }
    
            [Range(0, int.MaxValue), NinjaScriptProperty]
            [Display(Name = "whatevernameX", Order = 3, GroupName = "B")]
            public int whatevernameX { get; set; }
            #endregion
        }
    }
    Regards,
    William
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Nice, Thank you NinZa!

      Comment


        #4
        You are welcome!
        I'm glad to hear that I helped solve your problem.

        Regards,
        William
        ninZa
        NinjaTrader Ecosystem Vendor - ninZa.co

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        235 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        150 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        162 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        243 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        198 views
        0 likes
        Last Post CarlTrading  
        Working...
        X