The attached example shows how to automagically place indicator properties onto the property tab of the strategy. See attached images as well.
What the code shows is:
1. How to have indicator properties automatically on strategy properties
2. How to delete properties not required at that moment
3. How to update property names
4. How to update property descriptions
If you want to modify properties on the fly, the follow all the instructions above to get the code into your strategy. Thereafter, implement your logic into the method ModifyProperties.
The first is to delete properties which are not relevant at this moment. For example, if you set one property to say do only something simple, then you can dynamically remove the complex properties. It would look like this:
You can also change the name of the property. For example, in the optimizer, it happens sometimes that I need to know the range of values for a specific property. With this approach, I make the range as part of the property name. (The second example is easier achieved by statically setting the Gui.Design.DisplayName attribute.)
Similarly, you could update the property description to contain additional dynamic content:
What still does not work, is to have NinjaTrader step the indicator properties through a range. For the live of me, and after a few zillion hours of mucking around, I still don't understand when NinjaTrader decides that specific properties should have a range attached and when not.
I suspect that this part of the puzzle can only be resolved by having access to that piece of source code from the optimizer. As such, maybe on a rainy day, a developer from NT might give us the hint required.