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 aa731, Today, 02:54 AM
            0 responses
            4 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by thanajo, 05-04-2021, 02:11 AM
            3 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            10 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,237 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            4 views
            0 likes
            Last Post thread
            by thread
             
            Working...
            X