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 junkone, Today, 11:37 AM
            2 responses
            12 views
            0 likes
            Last Post junkone
            by junkone
             
            Started by frankthearm, Yesterday, 09:08 AM
            12 responses
            43 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by quantismo, 04-17-2024, 05:13 PM
            5 responses
            35 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by proptrade13, Today, 11:06 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            35 views
            0 likes
            Last Post love2code2trade  
            Working...
            X