NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-09-2009, 01:51 PM   #1
binwang2
Senior Member
 
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
Default change order type for the same order

Hello NT experts,

I will use stop order as the example.

Suppose I start with stop order stopOrder1 = ExitLongStop(...). When certain conditions are met, I change it to market order stopOrder1 = ExitLong(...). Will the stopOrder1 be replaced by market order automatically? Or do I end up with 2 orders?

Any comments are welcome.

Regards,
binwang2 is offline  
Reply With Quote
Old 09-09-2009, 02:05 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

You will end up with two orders. Just because you set something else to the IOrder does not remove the first order. All that happens is now you have lost all references back to the original stop order. If you wanted to replace the order you will need to first cancel it and then send the new one when cancel confirmation is received.
NinjaTrader_Josh 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
Can I Place This Type of Order? Shanghai ATM Strategies (Discretionary Trading) 9 07-20-2009 07:37 AM
Price Activation Order Type b-rock Suggestions And Feedback 4 09-09-2008 06:26 AM
Supported Order type for NYBOT ostadler SuperDOM and other Order Entry Windows 3 05-27-2008 01:10 PM
Combination order type 'Limit' and time-in-force 'Gtc' not supported by exchange richa61416 Strategy Development 1 02-06-2008 03:22 PM
Entry Order Type - Market If Touched tazman SuperDOM and other Order Entry Windows 1 03-19-2007 01:58 AM


All times are GMT -6. The time now is 02:57 PM.