Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Do Print() statements only work in OnBarUpdate()?
Collapse
X
-
Do Print() statements only work in OnBarUpdate()?
I've not seen anything in the language reference but it seems that the Print() statement only works within the OnBarUpdate() as all of my Print()'s within OnOrderUpdate() and OnExecutionUpdate() never appear. Is this the case or is there some way to make these work?Tags: None
-
Hello dweems,
Thanks for your post.
Print() statements are able to be used within OnOrderUpdate() and OnExecutionUpdate(). If a print is not appearing, it is likely that the logic to call the Print() statement is not becoming true. Note that OnOrderUpdate() is called each time an order managed by a strategy changes state. OnExecutionUpdate() is called on an incoming execution of an order managed by a strategy.
See this help guide documentation below for more information and sample code.
OnOrderUpdate(): https://ninjatrader.com/support/help...rderupdate.htm
OnExecutionUpdate(): https://ninjatrader.com/support/help...tionupdate.htm
See this reference sample from the NinjaTrader help guide demonstrating the use of OnOrderUpdate() and OnExecutionUpdate(): https://ninjatrader.com/support/help...and_onexec.htm
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
89 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment