![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
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.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
|
Jon, unfortunately not - you would need to monitor the price and cancel the order then manually as needed from the order entry windows.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2009
Posts: 124
Thanks: 0
Thanked 1 time in 1 post
|
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- |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I will send this to our development department for consideration. Thanks!
Ben
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |