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 rhyminkevin, Today, 04:58 PM
|
4 responses
52 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
5 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
7 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
14 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
50 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
Comment