Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about the account.Orders collection

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

    Question about the account.Orders collection

    I'm looping through this collection in an indicator to find active orders, but I'm wondering how big this collection can grow.
    Is it holding all account orders up until infinity?
    i need only the current days orders, and notice they'll at the end when I use foreach().
    Is there a way to get the current days orders without looping through all the previous ones?

    #2
    Hello wjadevries,

    Thank you for your post.

    The account.Orders collection holds all active working and accepted orders that are placed on the account. Inactive (filled, rejected, canceled) orders will be cleared from the Orders tab each day. The account.Orders collection will not contain inactive orders from previous days and will reflect the orders shown on the Orders tab of the Control Center, which contains the current day's orders as well as all active working orders.

    To get the current day's orders you would need to loop through account.Orders and add a check to see if the order.Time.Date is equal to today's date followed by printing information related to the orders.

    Please see the following help guide links for more information.

    Orders - https://ninjatrader.com/support/help...rs_account.htm
    Order Object - https://ninjatrader.com/support/help.../nt8/order.htm

    Additionally, please see the attached example script that demonstrates how you could print information for the current day's orders.

    Please let us know if we may assist further.
    Attached Files
    <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


      #3
      Thanks Brandon!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      77 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X