Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to default Indicator Label to empty/blank?

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

    How to default Indicator Label to empty/blank?

    When I add an indicator to a chart, I would prefer that the Label be blank by default.

    If in State == State.SetDefaults if I set Name to empty string, will that do it?

    I know I can manually do it in the Indicator dialog, but would prefer to not have to remember to do it each time.

    thx

    #2
    Hello llanqui,

    You can override the DisplayName method.

    Below is a link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      would that then be this???


      public override string DisplayName
      {
      set{ "" };
      }

      or, would this work

      DisplayName = ""

      ??​

      Comment


        #4
        Oh...well it says that it is read only...

        I'll try to set the Name = "" in State.SetDefaults and see if that works

        Comment


          #5
          Hello llanqui,

          Overriding the method would be correct, but the code would appear like the example in the help guide returning a string from the getter.

          Code:
          public override string DisplayName
          {
          get { return string.Empty; }
          }
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            yeah, that makes sense....C# is not my first language...thanks

            Comment


              #7
              Is there a way to do that globally so I dont hve to do it in each indicator script?

              Comment


                #8
                Hello llanqui,

                Unfortunately no, this would have to be coded into each script.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  what about in an AddOn?

                  Comment


                    #10
                    Hello llanqui,

                    Addons do not appear in the indicator window and do not have display name and do not appear on a chart and have no chart label.

                    The MenuItem and Caption would be whatever you have set these to.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      ok, then it seems the AddOn cannot be used to make global configuration changes for indicators...

                      thanks

                      Comment


                        #12
                        Hello llanqui,

                        There would not be any supported means for an addon to make global configuration changes to indicators.

                        However, you may be able to create unsupported code to do so.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          ::-) OK Thanks

                          Comment


                            #14
                            Ok, I used this in all my indicators and recompiled


                            public override string DisplayName
                            {
                            get { return string.Empty; }
                            }

                            and that removed the Indicator Label from the Chart

                            however, it also removed all the Labels/Indicator Names in the Configured column (right mouse click on chart, Indicators)

                            the Indicators are still on the Chart, but there is no name in the Configured column...


                            ????

                            Comment


                              #15
                              and all my chart indicator templates are the same...when I load a template there is no name in the Configured column of the Chart Indicator Dialog

                              Comment

                              Latest Posts

                              Collapse

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