Please note that futures contracts, by default, do not roll over at expiration. The TWS trading platform, however, does provide a feature to "Auto Roll Data for Expiring Futures Contracts". When specified in Global Configuration, the system automatically rolls soon-to-expire futures data lines to the next lead month. Approximately three days prior to expiration, the new lead month contract will be added to quote monitor. Approximately one day after the contract expires it will automatically be removed from the display.
Additionally, you can instruct TWS to cancel open orders on expiring contracts. If you have the auto-roll option selected, anytime there are open orders on expiring futures contracts you will receive a pop-up message asking if you want TWSto cancel the listed open orders in anticipation of expiration. Once the contracts expire the orders will be canceled automatically.
The following steps are to be performed in order to activate this feature:
1. Click the Configure wrench icon in the trading window
2. In the left pane of Global Configuration, select General;
3. In the right pane, check Auto Roll Date for Expiring Futures Contracts
Also note that with the exception of certain currency futures contracts, IBKR does not allow for the actual physical delivery of underlying commodities. Contracts which settle by physical delivery must be rolled over or closed out prior to a close-out deadline or face forced liquidation by IBKR. Please refer to the website under Delivery, Exercise & Corporate Actions for additional details as this deadline will vary by product.