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

How to define the signature of indicator constructor?

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

    How to define the signature of indicator constructor?

    When one codes an indicator and hits the "compile" button, the NT compiler generates constructors for the indicator, market analyzer, and strategy among other things. My question is how I can control the signature of the contructor. For example, let's say my indicator, IND, takes three parameters, a, b, and, c. The auto-generated constructor is IND(int a, int b, int c). However, I want IND(int c, int b, int a). How can I control it? Manual changes seem to be overwritten every time the code is compiled. It seems to have something to do with how the parameters are initially defined in the wizard, but it should not matter. Thanks!

    #2
    You can not control this I believe. Parameters may be sorted alphabetically and the constructor built based on this.
    RayNinjaTrader Customer Service

    Comment


      #3
      I agree with you that the parameters are ordered alphabetically. However, this is not quite desirable since you want the order to be logical to make it easy for the end user. Is there anyway to reorder it (like the workaround for the parameters in the window)? Thanks!

      Comment


        #4
        Unfortunately not.
        RayNinjaTrader Customer Service

        Comment


          #5
          Next version, I hope?

          Comment


            #6
            Thanks for the suggestion. We will put it on the list of future considerations.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            41 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            11 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            7 views
            0 likes
            Last Post port119
            by port119
             
            Started by Philippe56140, Today, 02:35 PM
            0 responses
            7 views
            0 likes
            Last Post Philippe56140  
            Started by 00nevest, Today, 02:27 PM
            0 responses
            7 views
            0 likes
            Last Post 00nevest  
            Working...
            X