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

parameter order for indicator

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

    parameter order for indicator

    Hello i have a number of input parameters i have declared and defined also in the properties section. I am trying to define my own order of how they appear when added to a chart. Which attribute is used to order the parameters as ninja seems to want to put them in some alphabetical order however in order to group in a more intuitive way i cant seem to get the order.

    Is it the parameter name or the properties name or the gui.design.displayname attribute or the description. it is a series of bid ask values but the code compiled is displaying as ask bid values which is counter intuitive to what i want.
    because 'parameter 1 ask' is alphabetically prior 'parameter 1 bid' the ask one appears first which is NOT what i want i want the bid first. Hope this makes sense .. any advice on this

    thanks

    #2
    Hello soulfx,

    Thank you for your inquiry.

    Alphabetical order of your parameters is the standard behavior of NinjaScript. Unfortunately, there are no settings that can be changed to change this behavior.

    However, there is a way that you can manually bypass this behavior.

    Please read the "Parameter sequencing" tip from our help forum for more information on how to manually arrange your parameters in the order you desire: http://ninjatrader.com/support/forum...d.php?t=4770#1

    NinjaTrader 8 will allow one to change the order of parameters without needing to resort to using the "\t" tab character.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      thanks for below - old reference too !! - works a treat !! lots of \t to manage 16 parameters i needed to order but does what it says on tin ... roll on N8 for this any many other great features !

      Comment


        #4
        Originally posted by NinjaTrader_ZacharyG View Post
        Please read the "Parameter sequencing" tip from our help forum for more information on how to manually arrange your parameters in the order you desire: http://ninjatrader.com/support/forum...d.php?t=4770#1

        NinjaTrader 8 will allow one to change the order of parameters without needing to resort to using the "\t" tab character.
        Hi, do you perhaps know how to use parameter order when there are multiple groups of parameters? I've read your NT8 post (http://ninjatrader.com/support/forum...66&postcount=2), but changing the `Order` value doesn't for me when there are multiple group of parameters.

        For instance:

        Code:
                [Range(1, int.MaxValue)]
                [NinjaScriptProperty, Display(Name = "High-pass period", Order = 0, GroupName = "Price band settings")]
                public int HPPeriod { get; set; }
        
                [Range(0.01, 3.0)]
                [NinjaScriptProperty, Display(Name = "Offset upper band", Order = 1, GroupName = "Price band settings")]
                public double OffsetUpperBand { get; set; }
        
                [Range(0.01, 3.0)]
                [NinjaScriptProperty, Display(Name = "Offset lower band", Order = 2, GroupName = "Price band settings")]
                public double OffsetLowerBand { get; set; }
                
                // Arrow settings
                [NinjaScriptProperty, Display(Name = "Plot arrows?", Order = 3, GroupName = "Arrow settings")]
                public bool PlotArrows { get; set; }
        
                // Colour settings
                [NinjaScriptProperty, Display(Name = "Colour price bands?", Order = 4, GroupName = "Colour settings")]
                public bool ColourPriceBands { get; set; }
        Gives:



        In other words, the groups are still ordered alphabetically despite the `Order` value.
        Attached Files

        Comment


          #5
          I have always had them alphabetized with the GroupName and then used the Order for my properties per Grouping and just stuck with it.

          Though I'm curious if this intentional or oversight? I for one would like the ability to order my Groupings.

          EDIT: SPOKE TOO SOON!

          Just found this -
          CategoryOrderAttribute() http://ninjatrader.com/support/helpG...rattribute.htm
          Last edited by Calonious; 10-08-2015, 10:46 AM.

          Comment


            #6
            Hello J_o_s,

            You would be able to re-order group names with the syntax in the link's page that Calonious has provided.

            Please, let us know if we may be of further assistance.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              Thanks Calonious, good find!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by guillembm, Yesterday, 11:25 AM
              2 responses
              9 views
              0 likes
              Last Post guillembm  
              Started by junkone, 04-21-2024, 07:17 AM
              9 responses
              68 views
              0 likes
              Last Post jeronymite  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              4 responses
              18 views
              0 likes
              Last Post trilliantrader  
              Started by mgco4you, Yesterday, 09:46 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by wzgy0920, Yesterday, 09:53 PM
              0 responses
              10 views
              0 likes
              Last Post wzgy0920  
              Working...
              X