Example:
Let us consider an indicator with two input parameters
-> an integer: the lookback period ("Lookback", Order = 0 in the Properties section)
-> a boolean: an interpolation option ("Interpolate", Order = 1 in the Properties section)
(1) Display of indicator in the indicator dialogue box
As expected the "Lookback" period is displayed first, the "Interpolate" option comes second.
(2) Calling the indicator programmatically via NinjaScript
In the parameter list "Lookback" needs to be listed first, "Interpolate" comes second. I would need to call the indicator as
MyIndicator(Input, int Lookback, bool Interpolate)
because "Lookback" has been attributed the order 0, while "Interpolate" has been attributed the order 1.
(3) Display of indicator in the upper left corner of the chart
The display of the parameters in the upper left corner of the chart does not take into account the order set under properties! It simply follows an alphabetical order. The indicator is displayed as
MyIndicator(Input, bool Interpolate, int Lookback)
Bad Usability
Why is the order of the input parameters inverted on the chart?
Anybody who uses an indicator would expect the same order for the parameter list
- when the indicator dialogue box is open
- when the indicator is called programmatically
- when the parameter list is displayed on the chart
Imagine that you have an indicator with 12 parameters. You want to call it programmatically. You have a chart with the indicator open and set the input parameters according to the parameter list shown on the chart. When you compile, you get a bunch of error messages.
Conclusion
The order of parameters displayed on the chart should be the order set under properties. The alphabetical order which is currently used is just confusing.
Comment