- ago
This is a question for Glitch, Eugene, Cone...

I've created a new indicator that wraps ZigZagHL. (Purpose is to extend the functionality of ZigZagHL). It takes the same parameters as ZigZagHL (Source, Reversal Amount, Reversal Type and When Confirmed).

The new indicator seems to be working fine, except I'm not sure how to specify the parameter for the Reversal Type so that when the dialog is shown for setting the parameters it can display the four reversal enumerations for the Reversal Type parameter. Hence, of course, I can use a ParameterType.Int32, but I'd like the enum values to show in a dropdown...

CODE:
protected override void GenerateParameters() { AddParameter("Source", ParameterType.BarHistory, null); AddParameter("Reversal Amount", ParameterType.Double, 5.0); // what to use for Reversal Type's parameter type to allow dropdown with selections? AddParameter("Reversal Type", ParameterType.Int32, 0); AddParameter("Assign when Confirmed", ParameterType.Boolean, true); }


(My original outing to create an indicator that extends ZigZagHL was to create a subclass of it, but found that the indicator won't show up in the indicator list. I guess because WL is snooping for direct descendants of IndicatorBase. I get it. :) )

Thanks, Paul
0
219
Solved
1 Replies

Reply

Bookmark

Sort
- ago
#1
Scratch my original post. I just figured out where I went wrong. It is possible to subclass from an existing indicator, and have the new indicator show up in the indicator list. Problem solved.
0
Best Answer

Reply

Bookmark

Sort