- ago
I am creating a BuildingBlock. One of its parameters is an indicator.
The BB GUI creates a ComboBox which enables me to select an indicator among all available indicators.
Now I wish to restrict this selection to just a handful of choices. How can I do this?
0
334
5 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.10% )
- ago
#1
The only method of restriction available here is to restrict it to smoothers only using ParameterType.Smoother.
0
Cone8
 ( 6.32% )
- ago
#2
You could add strings to a Parameter's Choices list, but you don't get the Indicator integration for setting Parameters with that.
0
- ago
#3
What about an additional optional parameter for AddIndicatorParameter() which specifies a user supplied callback which in turn allows to filter the Indicator List?

Could look like this:

CODE:
AddIndicatorParameter("MagicIndi", "XYZ", ParameterType.Callback, MyMagicFilter);


And MyMagicFilter could be a user supplied routine like this:

CODE:
bool MyMagicFilter(IndicatoerBase ib) { if(ib.Abbrev == "Magic") return true; return false; }


I think this would make the BuildingBlocks even more user friendly and less error prone.
0
- ago
#4
ParameterType.Smoother does not work as expected. It produces code which expects another <indicator>

???
0
Glitch8
 ( 12.10% )
- ago
#5
Yes, sorry about that.

Feel free to introduce a new #FeatureRequest for new functionality.
0

Reply

Bookmark

Sort