NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-07-2007, 03:11 PM   #1
dgregor5
Senior Member
 
Join Date: Jul 2007
Posts: 225
Thanks: 0
Thanked 0 times in 0 posts
Default Multi-instrument Strategy

Hi.
I am sure that this has probably been asked for before, but cannot find anything of benefit................. thus far.

Market analyser is excellent at alerting when specific conditions are met for multiple instruments.

What I would like to do is automate this into a simple strategy (e.g. if EMA(8) x-above EMA(21)....then go long) for say the components of the DOW 30 stocks. How would I go about doing this ?

thx in advance
David
dgregor5 is offline  
Reply With Quote
Old 12-07-2007, 03:18 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

You would just write a strategy, add all the instruments you want, use the Alert() method and then run the strategy on a chart.
NinjaTrader_Ray is offline  
Reply With Quote
Old 12-07-2007, 04:04 PM   #3
dgregor5
Senior Member
 
Join Date: Jul 2007
Posts: 225
Thanks: 0
Thanked 0 times in 0 posts
Default

that was easy - thx for the quick response as usual !!!!
dgregor5 is offline  
Reply With Quote
Old 06-29-2010, 02:31 AM   #4
mystiq
Senior Member
 
Join Date: Apr 2010
Posts: 147
Thanks: 21
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by NinjaTrader_Ray View Post
You would just write a strategy, add all the instruments you want, use the Alert() method and then run the strategy on a chart.
....but if you have a strategy with 20 instruments and you run it on one(1) chart, would the strategy work? or would it be better to load the 20 instruments into MA and run the strategy NOT from the chart?
mystiq is offline  
Reply With Quote
Old 06-29-2010, 02:55 AM   #5
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

mystiq, for this strategy to work you would need to add them in the strategy directly - as you then start it from your primary chart it would load / add the other bars objects as needed -

http://www.ninjatrader-support.com/H...struments.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 06-29-2010, 04:42 AM   #6
mystiq
Senior Member
 
Join Date: Apr 2010
Posts: 147
Thanks: 21
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
mystiq, for this strategy to work you would need to add them in the strategy directly - as you then start it from your primary chart it would load / add the other bars objects as needed -

http://www.ninjatrader-support.com/H...struments.html
thx NT_Bertrand...but if the stocks i added have no historical data (yet), how would i accomplish this? for instance XLI ? can i load them in MA to retrieve the historical data?
mystiq is offline  
Reply With Quote
Old 06-29-2010, 04:47 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

You're welcome - if you add the strategy to your chart it would trigger a data load if needed. As an alternative you could also just open up a standalone chart of the symbol in question to trigger a backfill (if you're connected to a feed supporting this).
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug: multi-timeframe strategy non-primary bar is off by one henry.omd Strategy Development 1 11-15-2007 12:37 AM
Multi timeframe strategy charts in strategy analyzer JonesWooHoo Strategy Development 10 10-31-2007 05:13 AM
Use of Order Entry APIs in multi-instrument environment lclifner General Programming 2 10-11-2007 05:58 PM
Multi Instrument "Close" price syntax ct Strategy Development 2 06-09-2007 10:54 AM
Multi-Timeframe use in a Strategy Freddie Strategy Analyzer 25 05-30-2007 07:02 AM


All times are GMT -6. The time now is 05:09 PM.