PDA

View Full Version : Cancelling and automated order


thepcmd
03-11-2007, 03:59 AM
I would like to know if this is possible. If I have a ninja strategy that automatically places an order when my conditions are met. The strategy places a limit order at the closing price of the candle the signal originated. I want to know if it is possible to have the script cancel the pending order if the trade moves 4 ticks in the direction of the trade before the pending order is filled. I currently manually cancel orders that do not fill prior to the trade moving 4 ticks. But I would like to automate the process to place the order and be smart enough to cancel the pending order if I do not get filled because I do not want to get filled after the move is over.

NinjaTrader_Ray
03-11-2007, 06:29 AM
Yes this is possible but you would have to program it in NinjaScript.

Ray

jerrylee
04-23-2008, 08:57 PM
I'm still new to this, so what code do I use to cancel a pending order?
Thanks.

NinjaTrader_Dierk
04-23-2008, 09:24 PM
http://www.ninjatrader-support.com/HelpGuideV6/CancelOrder.html

jerrylee
04-23-2008, 09:33 PM
http://www.ninjatrader-support.com/HelpGuideV6/CancelOrder.html

Thanks! I actually managed to find it a few moments before you replied =)