Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Open filled orders collection

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

    Open filled orders collection

    Hi


    I’m looking for a collection/list etc of filled orders. Note: not NT’s “Trades” which represent a matching open and close. Just the current filled, but not closed orders.


    NT must track these, for example with managed orders, so I presume its exposed and doesn’t have to manually coded but I just can’t see it in the help doc.


    Regards Bruce

    #2
    Bruce, you could only access the orders / orderstates that you specific strategy would manage, not all orders currently working by NT (manual ones for example as well).

    For a strategy script you would work with the IOrder objects :

    Comment


      #3
      Hi Bertrand

      I was only considering orders generated as part of a strategy.

      A practical context would be scaling into a position.

      For example, assume managed orders = true direction is long and each order contains a unique entry signal name.
      order 1 @ price 1 with stop loss set at 0.5
      some time later
      order 2 @ price 2 with stop loss set at 1.5
      some time later
      order 3 @ price 3 with stop loss set at 2.5

      At some point in time one or more of the stop losses could be changed, for example to move the stop loss to a break even price.

      To achieve this the SetStopLoss method requires the parameter "fromEntrySignal", which I would expect to obtain by walking a collection of open orders.

      So is there a collection containing all orders for the strategy that have been filled?

      Regards Bruce

      Comment


        #4
        Thanks Bruce, for monitoring the Set Stop / Target orders please see this example showing how to 'collect' them as they would not offer a native IOrder return - http://www.ninjatrader.com/support/f...ead.php?t=5790

        Comment


          #5
          Hi Bertrand

          Thanks for your assistance. I did several searches of the forum prior to creating the post but did not find these examples.


          As a general point, I presume the ArrayList handling in the sample code should have a synchronized wrapper to ensure thread safety.


          Thanks again Bruce

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          646 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          367 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X