Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to custom the Strategy Analyzer panel's UI ?

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

    How to custom the Strategy Analyzer panel's UI ?

    Hi NinjaTraders,

    In the custom Genetic Optimizer I coded, I copied the default GO's UI. While this only showed my Input beneath the General Tab, Named "Misc". How can I move it to below the custom GO just like the default GO?

    Thank you!

    Code:
            #region UI Properties
            [Display(ResourceType = typeof(Custom.Resource), Name = "PercentOfAllIterations")]
            [Range(0, Int32.MaxValue)]
            public double    PercentOfAllIterations        { get; set; }
    
            #endregion

    #2
    Hello wolfcuring,

    I see you are using the Display attribute but have not assigned any category. could you try changing it to how it is shown in the sample here:



    Code:
    [Display(Name="My Period", Order=1, [B]GroupName="My Parameters"[/B])]
    public int MyPeriod
    { get; set; }
    Also please ensure to remove the following syntax from your properties:
    Code:
    ResourceType = typeof(Custom.Resource),
    This is only needed for internal strings which are localized.

    I look forward to being of further assistance.

    Comment


      #3
      Thank you Jesse, so by changing the code into the following,

      Code:
      [Display(Name = "PercentToRun",Order=1, GroupName="GA Parameters")]
      [Range(0, Int32.MaxValue)]
      public double    PercentOfAllIterations        { get; set; }
      I can change the Group name to "GA Parameters", but it still appear below the General tab, and I have to scroll up to it to change the parameter. The Order=1 argument seems only to change the order within the "GA Parameters". Can I move the whole "GA Parameters" down below, and put it inside the Optimize tab just like the default GO ?

      Comment


        #4
        Hello wolfcuring,

        You can find more attributes that can be used in the parent page of the last one I had linked: https://ninjatrader.com/support/help...attributes.htm

        I believe you want the CategoryOrder: https://ninjatrader.com/support/help...rattribute.htm

        If you otherwise want it in the Optimize category, just use that as the GroupName.

        I look forward to being of further assistance.

        Comment


          #5
          Hi Jesse,

          Thank you for you reply. So now with the following code,

          Code:
          #region UI Properties
          
                  [Display(Name = "Z-PercentToRun",Order=5, GroupName="Optimize")]
                  [Range(0, Int32.MaxValue)]
                  public double    PercentOfAllIterations        { get; set; }
          
                  #endregion
          I can move it into the Optimize group. But, I still can not control its order, the "Order=5" argument does not seem to work.

          So, can I create a sub-group within Optimize just like the default Genetic Optimizer?

          Comment


            #6
            Hello wolfcuring,

            Thank you for the reply.

            This seems to only work for custom categories in the optimizer, so it looks like you would need to create your own category here to order the inner properties. You can look into using an ExpandableObjectConverter to create an expandable property however I would not suggest this. For strategies and other complex types this generally can result in errors during compiles.

            Comment


              #7
              Thank you Jesse, Well then this is good enough.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              67 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              142 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              76 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              47 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              51 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X