Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to determine if Execution is Buy or Sell?
Collapse
X
-
How to determine if Execution is Buy or Sell?
The Executions tab has a "Action" column for the executions but the Execution data structure https://ninjatrader.com/support/help...?execution.htm does not have this field. The Order field for the structure is not always available. How would I determine whether the Execution is buy or sell without the Order object?Tags: None
-
Hi ntbone, thanks for your post.
The Execution object will have an Order object as a property and there you can get the order action. If you can't or do not want to use that, you would either need to create specific Signal Names for the executions so you can identify them through a string literal or use the MarketPosition property.
Kind regards,
-ChrisL
-
The documentation states that not all Executions may have an Order object so getting that information from there may not always be possible. I do see the documentation for MarketPosition but it is not clear how a MarketPosition of Long or Short applies to an execution. Execution are Buy/Sell operations. The Action column shows Buy/Sell not Long/Short.
Comment
-
Hi ntbone, thanks for your reply.
The marketPosition parameter will report long for a buy execution and short for a sell execution. The Execution object will not have an Order object when its a ExitOnSessionClose execution or an execution from a NinjaScript submitted ATM. In that case, the signal name will be important, and you will know to check this if the Order object == Null.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
44 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
58 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
35 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
95 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
59 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment