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 08-01-2008, 12:32 PM   #1
skellington
Member
 
Join Date: Feb 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default Running two or more live strategies on the same symbol?

Hi everyone,

I'm currently testing a variety of strategies against live data during the day and am having a problem with running multiple strategies on the same symbol.

The way I have tried to do it is to open two charts on the same symbol and put a different strategy on each chart. The problem is that the orders seem to conflict with each other.

How can I run multiple strategies such that they keep track of their own orders independently?

Thanks.
skellington is offline  
Reply With Quote
Old 08-01-2008, 01:44 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

Are you trading futures, forex or equities? Which broker?
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-01-2008, 01:53 PM   #3
skellington
Member
 
Join Date: Feb 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

Equities. The data is coming from TD Ameritrade but it is running against the Sim101 account (not placing real trades).
skellington is offline  
Reply With Quote
Old 08-01-2008, 02:11 PM   #4
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

Thanks.

Can you clarify what you mean about conflicting orders in the Sim101 account?
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-01-2008, 02:32 PM   #5
skellington
Member
 
Join Date: Feb 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

I had two charts open, with a different strategy in each (A in one, B in the other), both trading the same equity.

When strategy A placed a long order, the order showed up in both charts and both strategies showed a position in the control center:strategies panel (1000L for example).

Then strategy A placed a short order but stayed at 1000L while strategy B went flat.

(I'm remembering the events from watching this in real time this morning so I might have the details slightly wrong.)
skellington is offline  
Reply With Quote
Old 08-01-2008, 03:34 PM   #6
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

This should not be the case. Are you sure you didn't run the same strategy on both charts or that each strategy actually generated an order
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-01-2008, 03:40 PM   #7
skellington
Member
 
Join Date: Feb 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

I'm sure that strategy B did not produce any orders while I was watching it.

Only strategy A produced orders which showed up as positions in both strategies.

I'm am sure they were not the same strategy though even if they were the fact that the positions eventually became different (but wrong) would say something is wrong.

Just so I understand though, you are saying that each strategy should be independent even when trading the same equity and using EnterLong/Short and ExitLong/Short in the strategies?
skellington is offline  
Reply With Quote
Old 08-01-2008, 03:58 PM   #8
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

Yes, they are independant. If your experience is otherwise, we would need a 100% reproducible scenario. Thanks.
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-02-2008, 07:40 AM   #9
skellington
Member
 
Join Date: Feb 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

Is there any way for me to test this using the simulated data feed? Or do I have to wait until the market opens again to test it again?

(I tried using the simulated data feed but nothing happened in the chart on the equity (AAPL for example) I was trading)
skellington is offline  
Reply With Quote
Old 08-02-2008, 09:30 AM   #10
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

Yes, you can use simulated feed. What you have to do is set a sim feed starting price for each instrument you wish to trade in the Instrument Manager.

Best approach is to connect to a real provider, load the most recent data, get the last close (lets say its $25), then set the sim feed starting price to $25 for this particular instrument.
NinjaTrader_Ray 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
Questions related to switching from simulation to live strategies... Elliott Wave Strategy Development 7 02-11-2013 03:27 PM
Running strategies adrian Suggestions And Feedback 3 05-13-2008 12:33 PM
Double positions switching sides running live w/ profit targets Pete S Strategy Development 13 04-02-2008 10:59 PM
chart not running live data chuck Miscellaneous Support 1 01-21-2008 09:29 AM
Multi strategies same symbol question? surfeur Automated Trading 3 06-15-2007 07:14 AM


All times are GMT -6. The time now is 04:52 PM.