However, the auto-generated construstor for your indicator now have all the properties as parameters. To use your indicator in a strategy or another indicator, you are forced to set all the parameters even though you do not care about the visual aspect of the indicator under the occassion. For example, you want to type MyMA(period) instead of MyMA(period, Color.Red). If your indicator has quite a few visual settings, it becomes annoying quickly.
What can we do? We have no control over how the constructors are generated, right? Well, not directly. My experiment shows that Parameters is a special category name. The NinjaScript compiler inspects your code and adds every property with that attribute to the list of parameters for the constructor.
Actually, you can come up with any category name to use. For example, if you add [Categogy("Visual")] to all the properties related to plotting, they will all display in a "Visual" section in the Indicator dialog box. And...they all disapper from the contructor's parameter list! You can type MyMA(period) to your heart's content. Now that's neat!
Comment