Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Label Parameters

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

    Label Parameters

    I'm dissecting an indicator.and am trying to understand how the contents of the 'Label' and other parameters get written on to the top of the indicator. What statement(s) determine what gets written at the top of the indicator?

    #2
    Hello dmking,

    We have a sample that explains the indicators label and how to format/remove it in the following link: https://ninjatrader.com/support/help...lightsub=label

    The label can be controlled by the user from the indicators properties menu or in code. If you use custom formatting in code, you can remove the label or reduce its length/make it more readable if needed.

    Keep in mind if you remove the label completely in code using the DisplayName override, that can change how the item is listed in the platforms user interface. Generally, you should also use the State object to provide a default label. You can find an example here: http://ninjatrader.com/support/forum...6&postcount=24


    I look forward to being of further assistance.

    Comment


      #3
      Thanks for the response Jesse, I'll look at the example, and very good guidance.

      D

      Comment


        #4
        Jesse,

        A follow up question. I want to leave the Indicators: Properties: Parameters Alone. That is, I want to be able to configure the parameters from the UI. The Properties: Label correctly only contains the name of the Indicator. I don't want to see the Parameters on the top of the chart. What do I change in the code to avoid this.

        This is urgent, so get back to me when you have the time.

        D

        Comment


          #5
          Sorry,

          This is NOT urgent.

          Comment


            #6
            Jesse,

            I reread what you sent, and the examples and got things to work using

            Code:
              public override string DisplayName
                        {
                        get { return "RepeaterV2.1"; } // to prevent showing all parameters (60+) on the chart
                        }
            But it would be useful to know how the label on the Top of the Chart gets generated and how to code to avoid that without using the workaround above.

            D

            Comment


              #7
              Hello dmking,

              Thank you for your reply.

              The label in the chart is generated from a combination of the Label property that you can set in the UI along with the user inputs. The syntax you have shown is not a workaround but would be the correct way to modify the label from code. This allows you to remove the parameters or add in just the important ones you wanted to see. This is simply a string which is returned when the label is requested from the indicator. The second thread I had linked demonstrates how to use the State object with this override in case you wanted specifically use a blank label as that causes the user interface to have a blank indicator listed.

              I look forward to being of further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              574 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              333 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X