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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    92 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X