What exactly do you mean by catch all? What are you trying to accomplish with the quantity
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Scaling in then all out
Collapse
X
-
Mathew
I need to exit All Open Long Positions at the Limit Price. That was the purpose of the emtpy ("") tag that Bertrand mentioned in post#10. These are unique entries. So is there a way to exit ALL instead of specifying an "int" in the quantity property? Scaling in then ALL out.
Thanks
Comment
-
Hello kenb2004,
Instead of cancelling the first target you can simply change it and submit a new 2nd target.
Please let me know if I can assist you any further.Code:if (buy2entry != null && buy2entry == order) { if (order.OrderState == OrderState.Filled) { //update the existing limit order ExitLongLimit(ExitLongLimit(0, true, 1, Position.AvgPrice + 4 * TickSize, "Buy_1Profit", "Buy_1Entry"); //submit a new order ExitLongLimit(ExitLongLimit(0, true, 1, Position.AvgPrice + 4 * TickSize, "Buy_2Profit", "Buy_2Entry"); } }JoydeepNinjaTrader Customer Service
Comment
-
Hello kenb2004,
In post 13 you have referred to the following code:
Can you tell me what is the buy2entry IOrder do?Code:protected override void OnOrderUpdate(IOrder order) { if (buy2entry != null && buy2entry == order)
Can you please send a toy NinjaScript code* describing the exact scenario you are facing to support[AT]ninjatrader[DOT]com
Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.
I look forward to assisting you further.
*The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.JoydeepNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
75 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
45 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
26 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
62 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment