Skip to content
Dave Mabe
Close menu

"Should I use MOC orders for my timed exits?"

By Dave Mabe

Here's a good question from fellow North Carolinian, Ross C. (name used with permission, lightly edited for clarity):


Ross C:

Using IBKR's API, how do you handle an OCA order if you have a stop, limit, and MOC (market on close) order? Seems that MOC orders will go through if the limit or stop hits within the last 5 minutes of trading. Any recommendations?


Dave:

Market-on-close orders are nice, but they come with the limitations you mention.

Interestingly, the behavior differs for orders depending on whether the stock's primary exchange is NASDAQ or NYSE.

For NASDAQ, you can enter and cancel MOC orders up until 3:50pm. Between 3:50pm and 3:55pm you can enter but not modify or cancel them.

After 3:55pm you cannot enter MOC orders for NASDAQ.

For NYSE, you can enter and cancel MOC orders up until 3:50pm. After 3:50pm you can enter MOC orders only if it offsets an existing imbalance and they can't be canceled.

There are lots of rules around these orders and the closing auctions, so make sure you understand the limitations.

Here is the current official documentation for how these orders work:

NASDAQ Closing Cross Doc

NYSE Opening and Closing Auction Doc

The complexity around these rules is why I strongly prefer the underrated "Good After Time" property on orders at IBKR.

This is the order type used in the MabeKit Trade Client for timed exits.

It has a lot of flexibility for the exact situation you described.

Thanks for the question, Ross!

-Dave

P.S. Have you ever made an order entry mistake that cost you money? Imagine never making a costly mistake again. Eliminate your trading mistakes with MabeKit. Get Instant Access to MabeKit