Just put all your generic strategy code in a class derived from the strategy class:
Then make individual strategies that inherit from this new base class. Since your base class inherits from the Strategy class, they are also Strategy objects and can call all the Strategy methods like Print() etc.
If you have methods that are small and multi-purpose, you can put them in the UserDefinedMethods indicator/strategy and have access to them in each respective namespace without having a bunch of other files with static classes everywhere.
Favorite Futures: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks: 70 given,
I have a mixture of utility procs in the user defined methods (I created my own - udm) and just used the namespace strategy and partial class strategy. I also have a load of extra classes that do bigger jobs, and I do indeed pass in the strategy to each one so I can use all the strategy methods.
The following user says Thank You to Xeno for this post: