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 jpeep, 08-16-2020, 08:31 AM
            13 responses
            487 views
            0 likes
            Last Post notenufftime  
            Started by realblubb, 04-28-2024, 09:28 AM
            2 responses
            32 views
            0 likes
            Last Post realblubb  
            Started by bmarovets, Today, 06:33 PM
            0 responses
            11 views
            0 likes
            Last Post bmarovets  
            Started by ETFVoyageur, Yesterday, 07:05 PM
            4 responses
            39 views
            0 likes
            Last Post ETFVoyageur  
            Started by JGriff5646, Yesterday, 10:02 PM
            2 responses
            24 views
            0 likes
            Last Post JGriff5646  
            Working...
            X