NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 08-15-2010, 03:00 PM   #1
lookOutBelow
Senior Member
 
Join Date: Jul 2010
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
Default Multiple strategies on the same instrument?

I've developed a couple of strategies that I'd like to run on ES at the same time. Ideally, I'd rather not combine them into one script, but keep them separate.

What kind of issues am I looking at? I.e.,, If the second strategy gets a buy signal while the first strategy is already in a position. I also don't want to close a position if strat #1 is long, and the second strat gets a short signal. Just wondering what kind of problems I could be looking at and how to work around them.

Also, when you check the market.position within a script, are you getting a result from that script position only?
lookOutBelow is offline  
Reply With Quote
Old 08-15-2010, 06:31 PM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

In your example, your broker will likely flatten you. You cannot be both long and short in the same market.
NinjaTrader_Ben is offline  
Reply With Quote
Old 08-15-2010, 06:54 PM   #3
lookOutBelow
Senior Member
 
Join Date: Jul 2010
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
Default

What about this?

"when you check the market.position within a script, are you getting a result from that scripts position only?"

I'm just wondering if there is something I can put in my two strats that can check to see if the other strat is in a position. That way I can tell it to ignore a signal if the other strat is currently in a position.


Thanks
lookOutBelow is offline  
Reply With Quote
Old 08-16-2010, 04:11 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

lookOutBelow, the strategy can only see it's own stratgy position per default, as NinjaScript strategies do not cross communicate, you could for example work around this by monitoring the positions saved to textfiles.
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
multiple strategies on same instrument dancorcal Strategy Development 1 08-11-2009 03:16 AM
Running Multiple Strategies on 1 Instrument SystemTrading Strategy Development 5 02-25-2009 12:04 PM
multiple strategies simultaneous on one instrument mrlogik Strategy Development 7 01-21-2009 07:52 AM
Multiple Strategies On One Instrument jvracing Automated Trading 7 04-23-2008 11:08 AM
Multiple Strategies on same instrument TraderTony Miscellaneous Support 10 03-10-2006 01:03 AM


All times are GMT -6. The time now is 03:34 PM.