> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# IgnoreOverfill

## Definition

An **unmanaged order property** which defines the behavior of a strategy when an overfill is detected. 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 expiration.

* Setting this property value to true can have serious adverse effects on a running strategy unless you have programmed your own overfill handling.
* User defined overfill handling is advanced and should ONLY be addressed by experienced programmers. Additional information can be found on overfills in the [Unmanaged approach](/developer/desktop-sdk/references/strategy/order-methods/unmanaged-approach).

## Property Value

This property returns true if the strategy will ignore overfills; otherwise, false. Default is set to false.

This property should ONLY be set from the **OnStateChange()** method during State.SetDefaults or State.Configure.

## Syntax

`IgnoreOverfill`

## Examples

```csharp
protected override void OnStateChange()
{
    if (State == State.SetDefaults)
    {
        // Allows for custom overfill handling
        IgnoreOverfill = true;
    }
}
```