Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Determining Original Order
Collapse
X
-
oh that is a nightmare for me ... so even with buylimit orders i will have to wait until i see it filled on OnOrderUpdate or executed in OnEcecution before i place my associated stops/targets?Originally posted by NinjaTrader_Josh View PostThe signal strings need to be 100% the same. You can only call the Exit()s after you have successfully entered into a long position.
Comment
-
If you want an order to be placed for your long position you have to tell it to place it after you actually have a long position. Trying to place them before you even have a long position does not work. There is nothing for them to exit and as such they will be ignored.Josh P.NinjaTrader Customer Service
Comment
-
Thanks Josh I am getting there!!!!Originally posted by NinjaTrader_Josh View PostIf you want an order to be placed for your long position you have to tell it to place it after you actually have a long position. Trying to place them before you even have a long position does not work. There is nothing for them to exit and as such they will be ignored.
two more questions:
1) if i place a long order for 2 lots and in OnExecution I get notification of 1 lot being executed (e.g. a partial fill) I place my ExitlongLimit for 1 lot (as a target for the 1 lot filled) and then I get another notification in OnExecution to say the 2nd lot has been filled I need to call ExitlongLimit again to set up my target order for te 2nd lot ... do I a) just call ExitlongLimit again with one 1 lot and Ninja will update my ExitlongLimit order to 2 lots or b) should I call it with the new total amount .. e.g. 2 lots ..
2) will OnOrderUpdate always get called before OnExecution ... if that is the case and I need to do b) above I can then just access execution.Order.Filled to update my target order
Thanks again
Paul
Comment
-
1. Call it with 2 lots to amend the original order to a quantity of two.
2. Yes OnOrderUpdate() is before. You should not use .Order.Filled because the underlying object could be already ahead of the execution. Problem like when you have 3 lots. First one fills, then second one. On second you call execution.Order.Filled, but it is already at a complete filled state. Now you just submitted 3 lot order without seeing the execution first. This will cause problems and should not be done. You will want to keep track of the .Quantity that comes in to the OnExecution for your signal name and keep track of it manually.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
633 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
567 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment