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