Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to fill a partially filled order?

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

    How to fill a partially filled order?

    How do I fill a partially filled order?
    i.e.
    I order quantity 10 but only partially quantity 1.

    Do I need to code how much is the partial fill and to fill the remaining (I hope not)
    or is there a method to keep trying until filled?
    I would like all my orders to be filled at any cost.

    Code:
    protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
    {
    
    if (
    order.Name == "LONG MNQ 03-21"
    )
    {
    entryOrderLongMNQ = order;
    }
    
    if (entryOrderLongMNQ != null && entryOrderLongMNQ == order)
    {
    Print(order.ToString());
    if (order.OrderState == OrderState.PartFilled)
    {
    [B]// Keep trying to fill at any cost[/B]
    }
    }
    
    }

    #2
    It will actually continue to fill. So you dont worry about it

    Comment


      #3
      Hello johnnybegoode,

      cincai is correct, an order that part fills is only partially complete, depending on the market it should fill the remainder when possible.

      Generally when you see PartFilled used with order based logic like you provided that is to manage the scripts variables or do other tasks related to the orders but not try to force fill or otherwise modify the existing order.

      For general trading concepts like fill or part fill I could make the suggestion of using external public trading resources like investopedia for their definitions. Our help information mainly will detail how those concepts can be used in the platform but will provide very little real world examples or descriptions. Here is a link to the public investopedia definition of fills which has an example of a part fill. https://www.investopedia.com/terms/f/fill.asp



      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

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