NexusFi: Find Your Edge


Home Menu

 





Grouping Strategies in a Master Strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sam028 with 1 posts (0 thanks)
    2. looks_two freewind with 1 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,829 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Grouping Strategies in a Master Strategy

  #1 (permalink)
 freewind 
US
 
Experience: Intermediate
Platform: Ninja trader ThinorSwim
Trading: futures forex
Posts: 1 since Oct 2010
Thanks Given: 1
Thanks Received: 0

Hi,

I Build a strategy that can run on many instruments(~50) with a slight modification of parameters. I want to be able to run all the strategies together but instead of manually set them in the strategy tab I was thinking on writing a Master strategy that take as an input the list of instruments and create new strategy instance for each instrument.
For example:
 
Code
List<MyStrategy> MasterStrategy = new List<MyStrategy>();
...
foreach (string str in Symboles)
                MasterStrategy.Add(new MyStrategy(str));
Something like that. Of course I need also to pass the Base but this is the general concept I want to achieve.
Is it possible design?
Is there sample codes that were tested for doing such a task?

Thanks in advance for any assistance!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Are there any eval firms that allow you to sink to your …
Traders Hideout
Build trailing stop for micro index(s)
Psychology and Money Management
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
44 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541


Haven't considered doing it this way.

In the past, have just written one "main strategy", and then added multiple bars dataseries to it, and managed it that way.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 sthlmjohan 
Stockholm, Sweden
 
Experience: Intermediate
Platform: Tradestation, Multicharts
Trading: ES, FDAX, CL, 6E, OMXS30
Posts: 12 since Jun 2012
Thanks Given: 15
Thanks Received: 6


freewind View Post
Hi,

I Build a strategy that can run on many instruments(~50) with a slight modification of parameters. I want to be able to run all the strategies together but instead of manually set them in the strategy tab I was thinking on writing a Master strategy that take as an input the list of instruments and create new strategy instance for each instrument.
For example:
 
Code
List<MyStrategy> MasterStrategy = new List<MyStrategy>();
...
foreach (string str in Symboles)
                MasterStrategy.Add(new MyStrategy(str));
Something like that. Of course I need also to pass the Base but this is the general concept I want to achieve.
Is it possible design?
Is there sample codes that were tested for doing such a task?

Thanks in advance for any assistance!

I have also a similar idea:
I would like to write a strategy that monitors a collection of intruments (30-50 stocks) for a certain buy signal. If I get a buy signal on 10 of them at the same time, I would like to buy the top 5 ones with the highest average historical return (using the strategy).

How can I accomplish this in Ninjatrader?

Reply With Quote
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


sthlmjohan View Post
I have also a similar idea:
I would like to write a strategy that monitors a collection of intruments (30-50 stocks) for a certain buy signal. If I get a buy signal on 10 of them at the same time, I would like to buy the top 5 ones with the highest average historical return (using the strategy).

How can I accomplish this in Ninjatrader?

You can do that having two strategies type:
- strategy A, running on the 50 stocks, and writing in a specific file when it has the buy signal
- strategy B, reading all files, and checking that you have at least 10 buy signals
To get the top 5 stocks, the easier is too manage manually, running backtests and store somewhere the best performers.
The B strategy will be "multi-instruments".
Their are smarter way to do that, but this is the simpler, IMHO.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote




Last Updated on November 26, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts