Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator not listed in configured list when DisplayName empty

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

    Indicator not listed in configured list when DisplayName empty

    I have some indicators, that never display a label, so they override DisplayName() and return string.Empty. When this is done, the indicator is listed with a blank entry in the Configured list when displaying Indicators on a chart.

    If the DisplayName is empty, then the default name should be used in the Configured indicator list.

    #2
    Hello aslane, and thank you for your query.

    An override that can fall through to a default behavior in a language like C# can be accomplished like so :

    Code:
    [FONT=Courier New]        private string exampleName = "";
            public override string DisplayName
            {
                get { return exampleName == "" ? base.DisplayName : exampleName ; }
            }[/FONT]
    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      The problem is not in my code, I purposefully set DisplayName to return an empty string so it NEVER displays a label on the chart (because there is no way to override the Label from code).

      The issue is NT does not recognize that the display name is empty when displaying configured indicators in the Indicators dialog, and so there is a blank row in the list (it is there, but you would not know because no text shows). What NT should do is the same thing it does in the available list, namely if the display name is empty, use the default name instead.

      Comment


        #4
        Thank you for this additional information.

        What you are describing would restrict the functionality of other programmers using NinjaTrader. NinjaTrader is currently capable of falling through to the default string through code such as the code sample I have provided. Your suggestion would introduce unexpected behavior which could break other code products. Your suggestion is greatly appreciated, but we must make sure that all our customers and partners needs are being met.

        The solution I proposed earlier is a long standing traditional solution to this class of problem. However, switches such as GUI switches are another common solution which enables everyone's needs to be met. With this in mind, I have submitted a feature request to the product management team for the following feature :
        This user would like a switch which causes the DisplayName setting to return base.DisplayName when an override would otherwise return an empty string
        I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.

        Please let us know if there are any other ways we can help.

        Thank you for your suggestions and help improving NinjaTrader 8.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Hello aslane,

          This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


          SFT-477


          Please let us know if there is any other way we can help.
          Jessica P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          10 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by WeyldFalcon, 12-10-2020, 06:48 PM
          14 responses
          1,428 views
          0 likes
          Last Post Handclap0241  
          Started by DJ888, 04-16-2024, 06:09 PM
          2 responses
          9 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          41 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          2 responses
          16 views
          0 likes
          Last Post bill2023  
          Working...
          X