← Back to Blog
How to Set Up Opening Range Breakout Trading in Interactive Brokers TWS
Published March 25, 2026 · 8 min read
Why Interactive Brokers for ORB Trading?
Interactive Brokers is one of the few brokers that gives retail traders direct market access, sub-penny routing, and a full-featured API. For Opening Range Breakout traders, this matters because:
- Speed. TWS connects directly to exchanges. Your bracket orders hit the market in milliseconds, not seconds.
- Bracket orders. TWS supports native bracket orders — a parent order with attached stop-loss and take-profit — which is exactly what the ORB strategy requires.
- API access. The IB API lets external tools read market data and place orders programmatically. This means you can automate the mechanical parts of the ORB workflow.
- Low commissions. IB's tiered pricing starts at $0.0035 per share. For active day traders placing multiple ORB trades per session, this adds up to significant savings.
Step 1: Enable the TWS API
The TWS API is how external tools — including RangeBreak — communicate with your TWS instance. To enable it:
- Open TWS and log in.
- Go to File → Global Configuration → API → Settings.
- Check "Enable ActiveX and Socket Clients".
- Set the Socket Port to 7497 (the default for live TWS; paper trading uses 7496).
- Optionally check "Allow connections from localhost only" for security — this ensures only programs on your own machine can connect.
- Uncheck "Read-Only API" if you want to place orders through the API (required for ORB trading tools).
- Click Apply and OK.
If you are using IB Gateway instead of the full TWS application, the same settings are available under Configure → Settings → API.
Step 2: Set Up Your Charts
For ORB trading, you need a chart that clearly shows the opening range. Here is a practical setup:
- Open a chart for your ticker and set the time frame to your preferred ORB interval (5-min, 15-min, or 30-min candles).
- In TWS, you can add horizontal lines manually at the opening range high and low after the first candle(s) close. Right-click the chart and select "Drawing Tools" → "Horizontal Line".
- Enable VWAP as an overlay — it serves as a useful confirmation tool. Breakouts above the opening range high that also hold above VWAP tend to be stronger.
- Add a volume sub-chart to monitor whether the breakout is happening on above-average volume.
Some traders prefer a clean chart with just price and volume. Others add moving averages (9 EMA, 20 EMA) for trend context. Keep it simple — the opening range itself is the primary signal.
Step 3: Configure Order Presets
TWS lets you save order presets (also called "order templates") so you do not have to manually configure bracket orders every time. To set one up:
- Go to Edit → Global Configuration → Orders → Order Presets.
- Create a new preset for Stocks.
- Under "Bracket", check "Create bracket order".
- Set the profit target offset and stop-loss offset in dollars, ticks, or percentage — depending on how you manage your ORB targets.
- Set the default order type to LMT (limit) for the parent order, STP (stop) for the stop-loss leg, and LMT for the take-profit leg.
- Enable "Transmit immediately" if you do not want manual confirmation for each order (use with caution).
Step 4: Market Data Subscriptions
To see real-time opening range data, you need active market data subscriptions in your IB account:
- US Securities Snapshot and Futures Value Bundle — covers NYSE, NASDAQ, and AMEX listed stocks. This is the minimum for US equity ORB trading.
- OPRA (US Options Exchanges) — only needed if you trade options-based ORB setups.
- Level 2 data — optional but useful for seeing order book depth at the breakout level.
Check your subscriptions under Account Management → Settings → Market Data Subscriptions. Missing subscriptions will show delayed (15-min) data, which is useless for intraday ORB trading.
Step 5: Connect an External ORB Tool
While you can trade ORBs manually in TWS, an external tool can automate the repetitive work:
- Tracking opening ranges across your entire watchlist simultaneously.
- Calculating position sizes based on your risk per trade and the opening range width.
- Placing bracket orders with the correct stop-loss and take-profit already calculated.
RangeBreak is a free dashboard built specifically for this workflow. It connects to TWS via the API on localhost, shows real-time opening range data for your watchlist, and lets you place bracket orders with one click. Download the local agent, connect it to TWS, and your ORB workflow is fully automated.
Paper Trading First
Before risking real capital, practice your ORB setup on an IB paper trading account:
- Log into TWS using your paper trading credentials (port 7496).
- Run your full ORB workflow — watchlist, range identification, order placement — as if it were real money.
- Paper trading in TWS uses real market data but simulated execution. It is the best way to validate that your API connections, bracket orders, and position sizing all work correctly before going live.
Checklist
- TWS running with API enabled on port 7497 (live) or 7496 (paper).
- Market data subscriptions active for your target exchanges.
- Chart set to your ORB interval (5/15/30 min).
- Bracket order preset configured.
- External ORB tool connected (optional but recommended).
- Risk per trade defined before the session starts.