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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 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