• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
            private string exampleName = "";
            public override string DisplayName
            {
                get { return exampleName == "" ? base.DisplayName : exampleName ; }
            }
    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 FMtrader, 03-15-2019, 02:30 AM
          6 responses
          31 views
          0 likes
          Last Post James108  
          Started by timko, Today, 08:18 AM
          0 responses
          1 view
          0 likes
          Last Post timko
          by timko
           
          Started by victorsmith, Today, 06:00 AM
          0 responses
          4 views
          0 likes
          Last Post victorsmith  
          Started by sohailashraf, Yesterday, 10:18 PM
          0 responses
          6 views
          0 likes
          Last Post sohailashraf  
          Started by jjnc2006, Yesterday, 07:36 PM
          0 responses
          16 views
          0 likes
          Last Post jjnc2006  
          Working...
          X