Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set label to empty string for indicators added from strategy

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

    Set label to empty string for indicators added from strategy

    Hi,

    In my strategy I want the indicators I add to the chart to have their label set to "" but I can't figure out how to do this.

    I did find this snippet

    Code:
    public override string DisplayName {
    get { return "Indicator Name"; }
    }


    for if you have access to the source of the indicator, however I don't for most of the indicators nor do I want to have to modify the indicators. Is there some way to do it from the strategy, instead?

    Can someone maybe show me an example with MACD if so?

    thank you

    #2
    Hello trader24211341,

    Thank you for your post.

    Unfortunately, there is no way to control this directly from the strategy itself. You can only control this from the individual indicators in their code.

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

    If you use custom formatting in code, you can remove the label by overriding the DisplayName.

    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 platform's UI. Generally, you should use the State object to provide a default label.

    Please let us know if you have any further questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    128 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    117 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X