• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Overfill... What is it?

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

    Overfill... What is it?

    Hello,

    I have recently started running a pair of strategies on a live data NT account.

    About once a day a message pops up about an overfill occurring.

    At this point, my strategies enter a trade, but do not reach their stop losses. Rather, the orders are cancelled mid way (regardless of the value of the market itself - somewhere in between my stop loss range).

    So the strategies place an order, then I get the message about overfill occurring, then the orders get cancelled, and then my strategies are disabled. At this point i have to go in manually and re-enable the strategies.

    I've tried reading a bit about overfill, but mainly I am getting information about how to disable this overfill with a line in the code. I'm not sure that I want to do this, as I don't fully understand what the purpose of the overfill is..

    Can you please explain to me what an "overfill" is exactly, and why it may occur?

    Thank you.

    #2
    Hello WilliamW,

    Thanks for opening the thread. Over Fills describe an occurrence where an order is filled or partially filled after the order was already marked for cancellation. The way these occurrences happen is subjective to the strategy logic and execution. Our help guide has the following explanations which may shed more light:

    Over-Fills is a serious issue that can occur when using complex entry conditions that bracket the market in both directions end up with both entries being filled instead of one being cancelled. Over-Fills can also occur when you place a trade quickly hoping to close a position while a prior order to close the same position already had an in-flight execution. The exact scenarios in which an over-fill can occur is highly dependent on the specific strategy programming. By default, NinjaTrader will protect against over-fills even though you are using the Unmanaged approach by halting the strategy, but should you decide to custom program your own over-fill handling it is up to you to either prevent over-fills from being a possibility in your code or by introducing logic to address over-fills should one occur.
    https://ninjatrader.com/support/help...d_approach.htm

    An overfill is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation. The cancel request could have been induced by an explicit CancelOrder() call, from more implicit cancellations like those that occur when another order sharing the same OCO ID is filled, or from things like order expirations.
    https://ninjatrader.com/support/help...reoverfill.htm

    The recommended resolution is to try to create scenarios which had caused an Over Fill in the Market Replay connection to reproduce the over fill to troubleshoot how you can manage the cancellation of your orders.

    Over Fills caused by a pending in flight execution may be harder to reproduce. For example, quickly attempting to close a position while a pending order at the broker already closes the position will not be as easy to reproduce locally. These sorts of scenarios should be minded while writing the strategy, and you can use IgnoreOverFill and further logic in OnOrderUpdate() to identify and handle Over Fills.

    IgnoreOverFill — https://ninjatrader.com/support/help...reoverfill.htm

    OnOrderUpdate() — https://ninjatrader.com/support/help...rderupdate.htm

    TraceOrders — http://ninjatrader.com/support/forum...ead.php?t=3627

    Market Replay — https://ninjatrader.com/support/help...ket_replay.htm

    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Orden33, Today, 10:09 AM
    2 responses
    5 views
    0 likes
    Last Post Orden33
    by Orden33
     
    Started by martyn73, Today, 10:18 AM
    3 responses
    4 views
    0 likes
    Last Post martyn73  
    Started by silverm3170, Today, 10:03 AM
    2 responses
    2 views
    0 likes
    Last Post silverm3170  
    Started by diff24rac, 04-04-2018, 05:32 AM
    6 responses
    473 views
    0 likes
    Last Post fx.practic  
    Started by gma17, Today, 08:58 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X