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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      670 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X