• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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, 09: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 tecmisc1, Today, 09:57 AM
              0 responses
              2 views
              0 likes
              Last Post tecmisc1  
              Started by mbesha, Today, 09:26 AM
              0 responses
              1 view
              0 likes
              Last Post mbesha
              by mbesha
               
              Started by Brillo, Today, 08:58 AM
              0 responses
              6 views
              0 likes
              Last Post Brillo
              by Brillo
               
              Started by avrege, Today, 01:48 AM
              2 responses
              13 views
              0 likes
              Last Post avrege
              by avrege
               
              Started by markbb10, Today, 07:14 AM
              0 responses
              7 views
              0 likes
              Last Post markbb10  
              Working...
              X