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.
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:
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 tkaboris, Today, 05:13 PM
|
0 responses
2 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,281 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
10 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
Comment