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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    78 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X