Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
An over fill was detected
Collapse
X
-
Hello SymeBB,
Thanks for the post and welcome to the NinjaTrader forums!
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.
To reduce the chance of overfill, you should avoid having targets and stop losses so close to the market, avoid using CancelOrder() with orders close to the market, or watch out for Autoexpiration with orders close to the market.Ryan M.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_RyanM View PostHello SymeBB,
Thanks for the post and welcome to the NinjaTrader forums!
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.
To reduce the chance of overfill, you should avoid having targets and stop losses so close to the market, avoid using CancelOrder() with orders close to the market, or watch out for Autoexpiration with orders close to the market.
What is the best way to avoid an overfill? Should I enter with liveUntilCancelled = true, and then at the end of the bar, cancel them manually, first checking whether the order is filled or partfilled?
Or is there a better way?
Thanks.
Comment
-
AntiMatter,
Overfills chance depends entirely on how the strategy is coded and the situations that arise from this. They're caused when resting orders are near the market and cancel is issued. Orders can be cancelled by:- sending CancelOrder()
- As part of an OCO group when another orders fills.
- Autoexpiration when using liveUntilCancelled = false (default behavior for orders).
- Due to internal strategy position management when the position associated with an order is no longer open.
Overfill is when those orders are filled before they can be properly cancelled. Setting liveUntilCancelled = false and cancelling on every bar is no less likely to avoid. To prevent overfills you should be aware of resting orders near the market and coding appropriate control for these. More control is available when using advanced order handling and advanced event handlers.
Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by stafe, 04-15-2024, 08:34 PM
|
7 responses
31 views
0 likes
|
Last Post Today, 11:19 AM | ||
Started by adeelshahzad, Today, 03:54 AM
|
4 responses
29 views
0 likes
|
Last Post
by adeelshahzad
Today, 10:51 AM
|
||
Started by merzo, 06-25-2023, 02:19 AM
|
10 responses
823 views
1 like
|
Last Post Today, 10:38 AM | ||
Started by frankthearm, Today, 09:08 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 10:19 AM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
43 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
Comment