PDA

View Full Version : How does Ninja Close a Position.


richa61416
10-28-2007, 07:32 PM
I am curious as to the method in which NInja Closes a strategy position.
If I am in a position as follows: Long Entry. Profit target 20 ticks, StopLoss 10 Ticks. If my strategy detects a change in market direction, and I trigger exit using the ExitLong command.

Would NinjaTrader first cancel the ProfitTarget and StopLoss entry orders, and then execute a Sell Order,

or it Executes the Sell Order, then cancells the ProfitTarget and StopLoss orders.

NinjaTrader_Josh
10-28-2007, 07:37 PM
It should execute sell and then cancel stop/profit. You can use TraceOrders to watch the exact behavior of your orders.

http://www.ninjatrader-support.com/HelpGuideV6/TraceOrders.html

richa61416
10-28-2007, 07:51 PM
Thanks Josh. I was thinking so, when I saw an error stating exceeded Margin. I guess Ninja has a good reason for performing it that way. My problem is, it affects my contract that can be traded, without incurring a margin error, when trying to exit.

Is there a way I can cancel the order generated by
SetProfitTarget(), so that It doesn't appear to my broker as if I want to trade an extra contract, when I really want to exit?

NinjaTrader_Josh
10-28-2007, 11:26 PM
This will be more doable in NT6.5, but for now perhaps you could try just modifying the profit target order to bring it down to the price you want to exit at?

http://www.ninjatrader-support.com/vb/showthread.php?t=3222