Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NT7 Displayname question

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

    NT7 Displayname question

    Hi

    In NT6.5 when used this code:
    [Gui.Design.DisplayName(" SammyIndicator")]
    my indicator would appear at the top of the list of indicators

    In NT7 it does not seem to function in the same manner any longer.
    Is there a different syntax now? sort sequence?

    Thank you in advance for your patience

    Sammy

    #2
    Originally posted by SammyC View Post
    Hi

    In NT6.5 when used this code:
    [Gui.Design.DisplayName(" SammyIndicator")]
    my indicator would appear at the top of the list of indicators

    In NT7 it does not seem to function in the same manner any longer.
    Is there a different syntax now? sort sequence?

    Thank you in advance for your patience

    Sammy
    As far as I know, the code
    Code:
    [Gui.Design.DisplayName(" SammyIndicator")]
    is used in NT 7.0 to change the name of the parameters in the indicator properties window (i.e. when one wishes to rename "MyInput0" to "My Input"), and thus not changing the name of the indicator itself.

    Even though you can override the name of an indicator, it won't have an effect on the listing of the indicators in the 'add indicator window'. But perhaps I'm mistaken, and would also like to hear more about this.

    Regards,

    Comment


      #3
      Sammy, unfortunately the DisplayName property is not supported anymore. You would need to change the underlying class / indicator name to provide different sorting.
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Thank you for your help!

        I tried replacing the class name to
        public class " SammyIndicator" : Indicator
        but this gives a syntax error

        I then tried the following and i accomplished the same as before ( not as nice but it is sorted at the top)
        public class _SammyIndicator : Indicator

        Regards
        Sammy

        Comment


          #5
          Just use this in your initialize section:

          Name = " SammyIndicator";
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Thanks for the suggestion, eDanny.

            You can't change just the name of the class, as the NinjaScript generated code section will have issues.

            You can save a copy of your indicator by Right Clicking > Save as >give a new name.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by habeebft, Today, 07:27 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_ChristopherS  
            Started by AveryFlynn, Today, 04:57 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by Max238, Today, 01:28 AM
            4 responses
            37 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by r68cervera, Today, 05:29 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by geddyisodin, Today, 05:20 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X