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:
To sort the two parameters you can modify the DisplayName tag with "\t" excluding the quotations. "\t" will not be included as part of your parameter display but instead is used as a switch for the purpose of sorting. Cascading these switches will allow us to sort the parameters in whatever manner we wish.
For example, if we wanted "Period" to be before "Number of standard deviations" we would do this:
Please take note that the first parameter to show up will be the parameter with the most "\t" cascaded in its DisplayName.
For more information on how to arrange the indicator/strategy's chart label, please see this reference sample: Removing and Custom Formatting an Indicator’s Chart Label