![]() |
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
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2007
Location: Anguilla
Posts: 140
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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/H...aceOrders.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2007
Location: Anguilla
Posts: 140
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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/v...ead.php?t=3222
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy order with name "Close Position" | ThePatientOne | Strategy Development | 30 | 09-03-2010 12:16 PM |
| Position.GetProfitLoss(Close[0], PerformanceUnit.Points) problems | scriabinop23 | Strategy Development | 2 | 05-18-2007 12:22 PM |
| Open position on close down | andrewedmondson | ATM Strategies (Discretionary Trading) | 3 | 10-05-2005 07:02 AM |
| long a contract with no way to close the position | flip | Miscellaneous Support | 1 | 09-19-2005 05:46 AM |
| Ninja dumping all position strategies upon reconnect | TraderPete | Automated Trading | 5 | 01-26-2005 02:20 PM |