Indicator and strategy parameters (user defined inputs) will always be displayed in alphabetical order in any indicator/strategy dialog window as default behavior. If you ever come across the need to have these parameters sorted in a non-alphabetical order you can custom sort it by modifying the parameter's DisplayName tag.
In the NinjaScript Editor, expand the the "Properties" region of your code where all of your parameters are defined. In this example, this will be our our Properties section:
[Description("Number of standard deviations")] [GridCategory("Parameters")] public double NumStdDev { get { return numStdDev; } set { numStdDev = Math.Max(0, value); } } [Description("Numbers of bars used for calculations")] [GridCategory("Parameters")] public int Period { get { return period; } set { period = Math.Max(1, value); } }
For example, if we wanted "Period" to be before "Number of standard deviations" we would do this:
/// <summary> /// </summary> [Description("Number of standard deviations")] [GridCategory("Parameters")] [Gui.Design.DisplayName ("\t# of std. dev.")] public double NumStdDev { get { return numStdDev; } set { numStdDev = Math.Max(0, value); } } /// <summary> /// </summary> [Description("Numbers of bars used for calculations")] [GridCategory("Parameters")] [Gui.Design.DisplayName ("\t\tPeriod")] public int Period { get { return period; } set { period = Math.Max(1, value); } }
For more information on how to arrange the indicator/strategy's chart label, please see this reference sample: http://ninjatrader.com/support/forum...ead.php?t=4749
Comment