I have successfully managed to run four trade ideas (strategies) within one strategy file using AddDataSeries and carefully managed unique entrance tags and exit tags for associating fills with one another. I believe they are not impacting one another. Easy to test this by comparing the aggregate equity curve (and trade list) to each separate one when run as their own strategy class. By combining them, I can run a port of independent strategies and optimize for some port metric.
Let's assume for this thread that every BarSeries will be the same granularity: daily.
I now want to be able to do this for say a dozen trade strategies. Some will be different futures run into the same strat, others will be different strategies run into the same future, etc. Instead of having it as one giant file, my interest is in building a class for each strategy and then having one file per strategy plus a single main file which I will call from Strategy Analyzer as the trade itself. From within the main file, I can call each strategy's class and pass in time series from each AddDataSeries etc.
How I set it up is: I copied the same 'Using declarations' region from the main strategy. Also, I used the namespace NinjaTrader.NinjaScript.Strategies but I am not calling the public class that I build a ': strategy.' Finally, I am not using the OnStateChange method at its beginning.
I am able to call the public class' public methods from the main strategy file just fine. BUT none of the basic default methods are available to me. For example, the basic built in methods like StochasticsFast(...).
Can anyone assist in this pursuit? I'm not a terrific developer but I get the basics. Thank you in advance!
-Tim
Comment