Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do Print() statements only work in OnBarUpdate()?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    43 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X