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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-21-2009, 04:11 PM   #1
jonmoron
Senior Member
 
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
Default Cancelling a Pending Order.

Hi,

Is there a way to cancel a pending order? Say I have an order in to sell at 100 and the market is at 95. Is there a way to cancel the order if the market moves to 90? I would like to cancel my sell automatically if a price is reached. Is there a condition I can place on the sell order?

I'd like to know if this is possible to setup using the ATM or any of the manual entry points using NT. I believe I might be able to set something up code-wise to handle this very situation.

Any thoughts?

thanks-
jon
jonmoron is offline  
Reply With Quote
Old 07-21-2009, 04:17 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

Jon, there is a way to cancel a pending order. The method is called CancelOrder(). Also, we recently posted a reference sample for how to cancel orders.

Unfortunately, NinjaTrader strategies cannot take over for a discretionary trade, which I think is what you're looking for. CancelOrder is only usable in NinjaScript strategies.
NinjaTrader_Austin is offline  
Reply With Quote
Old 07-21-2009, 11:07 PM   #3
jonmoron
Senior Member
 
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
Default

Austin,

Thanks for the reply. I'm actually looking for a way to cancel a pending order when that pending order is placed via the SuperDOM or BasicEntry form. Is there a way to use the the SD or Basic Entry form to manually set a cancel condition on an order?

thanks!
jon
jonmoron is offline  
Reply With Quote
Old 07-22-2009, 03:36 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Jon, unfortunately not - you would need to monitor the price and cancel the order then manually as needed from the order entry windows.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-24-2009, 08:36 PM   #5
jonmoron
Senior Member
 
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
Default

Is there a way we can see this in a future release of NT. It seems like something a trading platform should have. Something similar to a "kill level" that associates trades with a price. If that price is hit then it cancels the related order.

thanks-
jonmoron is offline  
Reply With Quote
Old 07-26-2009, 11:39 AM   #6
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,

I will send this to our development department for consideration. Thanks!
NinjaTrader_Ben 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
Cancelling Order/Entry Order filled cancels all other entry orders ScottB ATM Strategies (Discretionary Trading) 2 06-03-2009 12:19 PM
Cancelling and placing order in other direction pkuskopf Strategy Development 3 04-22-2009 01:38 PM
Cancelling open order(s). 8DTK8 Strategy Development 5 09-29-2008 12:04 PM
Cancelling and automated order thepcmd Automated Trading 4 04-23-2008 09:33 PM
Automatic Order cancelling khawaja Automated Trading 3 10-17-2007 02:24 PM


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