Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Succeeded in updating the description as well. As a final step have gathered all the code into cut-and-paste sections with three utility methods for deleting a property, updating the name and updating the description. From the (attached!) example:
All the relevant code is boiler plate sections that can just be copied into a strategy. Commented to explain what everything does.
Caveat emptor: code tested, but I am not C# expert galore, it could be that I overlooked something somewhere.
But for now it works beautifully.
In the attached strategy is the complete example, with all of the code ready for cut and paste.
I've been trying to implement this type of code in my strategy, but I've been trying to base it off the code found in this NinjaWorkShop strategy. It seems to be based off of the code in this thread by @jeremytang and @zr6bcm, but it is able to dynamically remove properties without cluttering the properties section with many additional 'trigger' properties. The actual strategy is quite complex as far as NT strategies go, so if someone could make a simple sample code for how this works I would really appreciate it.
For a simple and a practical context, I think the sample should include a dropdown menu enabling an EMA crossover strategy, a MACD cross strategy, or both.
In this case the variables would be ema fast, ema slow, macdfast, macdslow, and macd smooth.
I've found the answer to my own question. I did not add the ICustomTypeDescriptor class! After many hours of looking it over and retyping everything multiple times, it all came down to this. So if you're looking to add this to your strategy be sure to change this: