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 GLFX005, Today, 03:23 AM
            0 responses
            1 view
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            11 views
            0 likes
            Last Post XXtrader  
            Started by Waxavi, Today, 02:10 AM
            0 responses
            6 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Started by TradeForge, Today, 02:09 AM
            0 responses
            12 views
            0 likes
            Last Post TradeForge  
            Started by Waxavi, Today, 02:00 AM
            0 responses
            2 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Working...
            X