Thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
PartFilled and SL/TP
Collapse
X
-
PartFilled and SL/TP
Suppose I am using the managed approach and my order is only 60% filled (PartFilled) and I catch the stop loss or take profit. What happnes to the rest of the 40%? Is it cancled? Is it remains alive? Does the SL and TP orders are sill alive?
ThanksTags: None
-
Hello kiss987,
When an order is part filled, it will continue filling until filled.
If you attempt to cancel the order while in a part filled state, this cancellation would need to be received before any more contracts are filled for the cancellation to be effective.
Any stop loss and profit target placed with SetStopLoss and SetProfitTarget will still be working and the quantities will match the filled amount.Chelsea B.NinjaTrader Customer Service
-
Hello kiss987,
I'm not understanding what you mean.
The position is the number of contracts you are long or short.
"once the partially filled position has reached SL/TP I want to flat the remaining order with its SL+TP"
Can you clarify your inquiry?
Are you trying to exit the trade immediately after you enter the trade? As in, once the entry order fills, how do i place a market order to exit the trade immediately?
If you have already set a stop loss and profit target using SetStopLoss and SetProfitTarget, these will be submitted after your entry order part fills and then fills.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello
I'll eplain myself using an eample:
Suppose I entered a 10 lot long limit order with a SL and TP. Then, only 6 lots were filled and eventually closed at the TP. If I understand correctly, I have now a 4 lot order open (plus TP and SL). I want to cancel that 4 lot order (with its TP and SL) immediately when the 6 lot position is closed on TP.
How can I do that?
Comment
-
Hi kiss987,
You can call CancelOrder(myOrder) and this will cancel the remaining amount (as long as no further quantity has part filled).
However, be aware that if the cancellation amount doesn't match the remaining amount and overfill error will occur.
http://ninjatrader.com/support/helpG...ancelorder.htmChelsea B.NinjaTrader Customer Service
Comment
-
Hello kiss987,
Thank you for your post.
The Order States would be Working or Accepted. For information on the Order States please visit the following link: http://ninjatrader.com/support/helpG...efinitions.htm
Please let me know if you have any questions.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by The_Sec, Yesterday, 03:37 PM
|
1 response
11 views
0 likes
|
Last Post Today, 06:17 AM | ||
Started by vecnopus, Today, 06:15 AM
|
0 responses
1 view
0 likes
|
Last Post
by vecnopus
Today, 06:15 AM
|
||
Started by Aviram Y, Today, 05:29 AM
|
0 responses
5 views
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
27 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
36 views
0 likes
|
Last Post Today, 05:15 AM |
Comment