Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter Orders not from OnBarUpdate()
Collapse
X
-
Hello appleseed,
Yes, you can place orders other than OnBarUpdate() but not necessarily every place in your script. You need to check that the order methods are available within the scope you're trying to place them. You can see the following sample for help placing orders outside OnBarUpdate()
The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()Ryan M.NinjaTrader Customer Service
-
Ryan,
Here you provided another good example of event driven method, or OnExecution(). So I assume other similar places such as OnMarketDepth() should be fine too?
Also when you said "to check that the order methods are available within the scope", how do I make sure this is indeed in the scope?
Thanks.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
673 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
379 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 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
577 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
582 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment