Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders behavior when multiple executions occur during State.Partfilled

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

    Orders behavior when multiple executions occur during State.Partfilled

    Under the managed order approach, with EntryHandling.UniqueEntries with two entry orders active with two open orders:

    EnterLongLimit(0, true, 10, GetCurrentBid() - 2, "LongLimit")
    EnterLongStopMarket(0, true, 10, GetCurrentAsk() + 2, "LongStop")

    As one or the other order is hit, and partial fills occur, as State.Partfilled events fire does the NT managed order code reduce the un-hit's order quantity by the amount of the PartFilled order?

    #2
    Hi lavalampmj, thanks for your note.

    Yes, that is correct. When a partial fill occurs the amount filled in a part fill will be taken out of the total quantity until the "Quantity" property is reached. For an example that places stop and target orders for the strategy entry order and handles partial fills well, please see this sample:



    Please let me know if I can assist any further.

    Comment


      #3
      In the example code the order behavior property is set to:

      EntriesPerDirection = 1;
      EntryHandling = EntryHandling.AllEntries;

      In my code I have:

      EntriesPerDirection = 1;
      EntryHandling = EntryHandling.Unique;

      So I would expect to be able to have two entries in the same direction so long as each order has a differing name.

      I had assumed that The total Order.Quantity property is a associated with each of the orders, not the total of all the orders in that direction.

      In my code in OnExecuteUpdate I was reducing the quantity of the un-hit order by the partfilled quantity on the executed order. However this was being ignored, as I was changing the value to something that already had been set. Which means it was behaving as you describe. I am surprised though that this is correct given EntryHandling.Unique setting?

      Comment


        #4
        Hi lavalampmj, thanks for your reply.

        You should not need to adjust the quantity of your order if you get partial fills on it. Normally the order is already getting processed at the exchange when it partially fills. Do you have a code example that describes the problem?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        88 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        134 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
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X