![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Jul 2010
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
In your example, your broker will likely flatten you. You cannot be both long and short in the same market.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2010
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |