Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator label rename

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

    Indicator label rename

    Hi,

    my question would be: if i add indicator in strategy, then can i rename the indicator label in the strategy code (that is seen at the top of the chart)?

    #2
    Try something like

    SMA(20).Name = myName;
    RayNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ray View Post
      Try something like

      SMA(20).Name = myName;
      Ohhh, it works much better, because i used this

      SMA(20).Plots[0].Name = myName

      Thank you Ray

      Comment


        #4
        Can you set the label name within an indicator

        I see you can do it from a strategy.
        Is it possible to set the label in an indicator and if it is could you show the code line?

        Comment


          #5
          Something like this? http://www.ninjatrader-support2.com/...ead.php?t=4749
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Labels everywhere

            no the label in the Dialogue Box under General is what I am looking to define.


            btw the sample label trim - how does that work anyway? What exactly does the override string method do as my chart shows all 4 parameters?

            Comment


              #7
              Mindset,

              The sample can trim your label to anything you want. It can rename the label that shows up on the chart, remove inputs from even showing, etc.

              The display name will show up as whatever name you name the indicator in the dialogue window though. If you want it to display a different name I suggest you take a look at the TEMA indicator above where it declares the public class.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                err..

                I must be dim.
                1. I can't find the TEMA indicator you refer to.
                2. the samplelabel trim doesn't do anything. I simply get 4 pieces of text on the chart - the ToString() override doesn't affect what is displayed on the chart in any way
                Attached Files

                Comment


                  #9
                  1. Scroll down on your list. It should be there. It is a system indicator.

                  2. Notice how the sample has four parameters. Then notice how only 1 of the parameters is listed in the header.
                  Attached Files
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    System indicator

                    I didn't think of that - I spent 20 mins searching all through the forums (lol)
                    So if you want to have no label you just put:-

                    Code:
                    	public override string ToString()
                    		{
                    			return " ";
                    		}
                    Am I overriding a string object property with this method?
                    Thanks for the patience.
                    FYI I will use this with almost every indicator I have as I hate having labels cluttering up my nice clean charts!

                    Comment


                      #11
                      Mindset,

                      That would be correct.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

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