Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Exiting and reversing a trade with one order.
Collapse
X
-
Exiting and reversing a trade with one order.
I would like to exit an existing trade with a stop and perform a reversal at the same time. I feel like I've seen somewhere that you can do that while exiting by setting the quantity greater than the quantity of the existing order. But I can't seem to find that in the documentation. I can work with either managed or unmanaged orders. Is this possible and which order type can I do that with?Tags: None
-
Hello dweems,
Thank you for your post.
When using the managed approach, Entry() methods will automatically reverse a position. If you are in a long position and then call a short entry, such as EnterShort() then two executions will occur. One execution will be to close the long positions and the other will be to enter the short position. This is the final bullet point under "A few key points to keep in mind" on the following page:
Because a managed entry order in the opposite direction can also reverse a position, it is important to keep the internal order handling rules in mind where certain order methods will be ignored if other order types are submitted and working:
Working with the unmanaged approach, you could certainly test out a reversal with an order that goes in the opposite direction of your position for a quantity larger than your position. For example, if you have a 2 long position and you want to exit those 2 contracts then also reverse to 2 short, you could SubmitOrderUnmanaged() with an orderAction of OrderAction.Sell and a quantity of 4. Two of those contracts would count to exit out of the long position, and the other two would put you into a short position. For additional information regarding the Unmanaged Approach, please see the help guide section here:
Please let us know if we may be of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
53 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment