Yes,
You can make a bracket order from the begining. Right click on you order before sending it, attach/bracket.
Or, when the trade is on, create your limit and stop orders, dont send them, give them an OCA (One Cancells All) group name and then send both orders. You have to add a column in TWS for the OCA group or enter it in the order ticket window.
For details, RTFM (go to IB website, trading/order type).