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 07-17-2008, 11:16 AM   #1
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default Order execution

Hi.

I have a question about orders execution.
How I can control order execution? Via OnExecution() method?
If I will submit one order, and immediately try to place other order, I must wait for fill first order?

With best regards.
funky_boy is offline  
Reply With Quote
Old 07-17-2008, 11:33 AM   #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

Depends, what do you wish to accomplish?
NinjaTrader_Ray is offline  
Reply With Quote
Old 07-17-2008, 11:37 AM   #3
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

I want to place two orders as fast as possible. Ideally, parallel submission.
funky_boy is offline  
Reply With Quote
Old 07-17-2008, 11:41 AM   #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

Two entry orders? Two Exit orders to protect a position?
NinjaTrader_Ray is offline  
Reply With Quote
Old 07-17-2008, 11:50 AM   #5
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

Entry orders for example.
funky_boy is offline  
Reply With Quote
Old 07-17-2008, 11:52 AM   #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

Simultaneous entry orders are currently not supported.

Exit orders are, see here for reference sample - http://www.ninjatrader-support.com/v...ead.php?t=7499
NinjaTrader_Ray is offline  
Reply With Quote
Old 07-17-2008, 10:52 PM   #7
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

In other words, if I want place one order and other order after first, I must submit first order, check success execution, and submit second order. Correct?
funky_boy is offline  
Reply With Quote
Old 07-17-2008, 10:58 PM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Yes. That will yield you the quickest sequential order placement possible.
NinjaTrader_Josh is offline  
Reply With Quote
Old 07-17-2008, 11:12 PM   #9
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for answers.

And If I have two brokers (FX and stocks), without instruments superposition, and submit one order for FX pair, and second order for stock, will orders route automatically, without explicit indication of order direction?
Last edited by funky_boy; 07-17-2008 at 11:20 PM.
funky_boy is offline  
Reply With Quote
Old 07-17-2008, 11:54 PM   #10
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You will need to tell it which instrument to submit the order to. It should handle the rest provided your data for each instrument is coming exclusively from the corresponding broker.
NinjaTrader_Josh is offline  
Reply With Quote
Old 07-18-2008, 12:23 AM   #11
funky_boy
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

Can you bring example?
funky_boy is offline  
Reply With Quote
Old 07-18-2008, 01:19 AM   #12
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please see our reference sample section for how to submit orders: http://www.ninjatrader-support.com/v...splay.php?f=30
NinjaTrader_Dierk 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
A few basic questions on order execution FireFly Automated Trading 3 05-16-2008 06:32 AM
Cross Above/below Order Execution Delay Willl Strategy Development 5 04-02-2008 01:36 PM
E-mail Sent Upon Order Execution dgregor5 Strategy Development 13 10-07-2007 02:11 PM
order execution HelloHello Automated Trading 2 08-29-2007 12:17 AM
Sending E-mail upon order execution dgregor5 Automated Trading 25 07-30-2007 01:19 PM


All times are GMT -6. The time now is 11:42 AM.