There is some function in ninjascript that lets me know when I made a buy order (And I have not sold). ? Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to know if a strategy placed a buy order
Collapse
X
-
Hello 7robert,
Thanks for your post.
Typically within NinjaScript, you would check the strategy's position with Position.MarketPosition and Position.Quantity to get the quantity in that direction.
If you would like to track when an order is pending or has been submitted, cancelled or filled, I recommend using OnOrderUpdate for this purpose. It can also be helpful to track each order as their own Order object.
Position - https://ninjatrader.com/support/help...s/position.htm
OnOrderUpdate - https://ninjatrader.com/support/help...rderupdate.htm
SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm
Please let us know if there is anything else we can do to help.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
47 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
23 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment