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 NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        127 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X