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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X