Custom Optimizer Settings
Author: bjk
Creation Date: 5/25/2010 5:00 PM
profile picture

bjk

#1
Hi,

I wrote a custom optimizer and the user should have the option to change some settings. How can I show an "Optimizer Settings" dialog like the Monte Carlo and Genetic Optimizer do when the user presses the "Settings ..." button?

Cheers,
Bjoern
profile picture

Eugene

#2
Hi Bjoern

Basically, you need to:

1. Implement ICustomSettings in your PosSizer.
2. Set up a GUI dialog as a UserControl
3. Return the UserControl in GetSettingsUI()

For more, please see the "Creating Custom Settings" PDF linked in the Wealth-Lab Wiki.
profile picture

bjk

#3
Hi Eugene,

Ok, that works. Thanks for the quick reply.

Cheers,
Bjoern
profile picture

LenMoz

#4
This solution is from 2010. Do custom settings still work this way in WLP 6.7? If so, I don't know what to reference to get by a compiler error on...
CODE:
Please log in to see this code.

Any expansion on this answer...
QUOTE:
1. Implement ICustomSettings in your PosSizer.
2. Set up a GUI dialog as a UserControl
3. Return the UserControl in GetSettingsUI()
... would be helpful to this C# dialogue newbie (code example?). Thanks.

Compiler error is:
Error CS0246: The type or namespace name 'ICustomSettings' could not be found (are you missing a using directive or an assembly reference?)
profile picture

Eugene

#5
Lots of examples of ICustomSettings usage:

Home - Community.Commissions
Home - MS123.PosSizers
Home - Community ChartStyles

They all implement ICustomSettings.

QUOTE:
Error CS0246: The type or namespace name 'ICustomSettings' could not be found (are you missing a using directive or an assembly reference?)


As suggested in the ICustomSettings manual (that can be found linked here), add a reference to Fidelity.Components.dll.
profile picture

LenMoz

#6
Thanks, I've got some learning ahead. BTW, I do now have a working "particle swarm optimizer." Number of particles and number of iterations are currently hard-coded. Hence the need for ICustomSettings.
profile picture

Eugene

#7
Nice to know.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).