Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Overfill question

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

    Overfill question

    I know, that when order is filled during cancellation request,
    we get order-state Rejected with OverFill == true.

    I understand, that this happens, when all contracts are filled.
    But what happens, if not all contracts are filled? ie.only partial fill occured

    Problem scenario
    Imaging we have order with quantity of 100 contracts and we sent cancellation request.
    • 50 contracts were filled
    • and remaining 50 contracts were cancelled.


    This scenario is something in between - there is partial cancel and partial overfill:
    • cancellation was partially successful (50cts over-filled, but other 50cts were successfully cancelled.
    • overfill was also partial - not whole order-quantity was filled - only 50cts


    Question
    1. What will be the resulting order-state now? Rejected or Cancelled ?
    2. Will be OverFill == true also?
    Last edited by misova; 08-23-2015, 03:16 PM.

    #2
    Hello,

    Thank you for the question.

    This would still be considered an overfill even though it is a partial fill, please see this document in the help guide: http://ninjatrader.com/support/helpG...reoverfill.htm

    In the note about overfills it shows: An overfill is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation.

    This would be the same as a standard Filled overfill in this case because the order was marked for cancel.

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you for answer.
      Now I am not sure about the Rejected state after your answer.

      You mentioned: overfill condition can be detected in both cases - when order is fully filled or only partial filled (when cancellation was sent before that).
      Now, I am not sure, where is the role of OrderState.Rejected in context of these overfillls.

      I feel there is possible mismatch in meaning of "filled" in context like "fully filled order" vs "order in state OrderState.Filled"

      So I will ask very specifically:
      1. In case overfill is detected with full fill of the order - what will be value of OrderState? Filled or Rejected? (I assume Filled according to latest knowledge)
      2. In case overfill is detected with partial fill order, what will be value of OrderState? PartFilled or Rejected? (I assume PartFilled according to latest knowledge)
      Last edited by misova; 08-25-2015, 03:24 PM.

      Comment


        #4
        Hello,

        In both cases, the order would report overfill = true and would be filled or part filled depending on what had occurred. Overfills can occur without rejections so the state can vary, NinjaTraders internal logic detects the overfill when it occurs but the order would only be marked as rejected only if it was rejected and is reported that way by the broker.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        193 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,235 views
        0 likes
        Last Post xiinteractive  
        Working...
        X