Advertisement IC Markets

The cancel race: deleting an order that is already filling

Compare ECN/Raw spread brokers, analyze execution speeds, report slippage, and evaluate commission structures for high-frequency traders.
Post Reply
Amanhasnoname
Posts: 1506
Joined: Fri Oct 30, 2026 9:45 am

The cancel race: deleting an order that is already filling

Post by Amanhasnoname »

A limit order that price is approaching feels easy to cancel if conditions change. But a cancel request takes time to travel and be processed, and during that window the order may fill. The result is a position the trader thought was avoided.

The race is most dangerous in fast markets, where the delay between deciding and acting is the difference between a cancel and a fill. News and impulsive spikes are classic cases.

After sending a cancel, do not assume it worked. Check the order list and position list. If the order filled, the response should be immediate: either close the position or manage it as planned.

In code, treat the cancel as a request with an uncertain outcome. Handle both results: confirmed cancelled and already filled. Many EAs only handle the first.

An additional risk is partial fills. A cancel may succeed for the remaining size while part of the order has already filled, leaving an unexpected small position.

How does the system verify the result of a cancel request?
Recommended broker for automated trading & scalping IC Markets
Post Reply