ADT
ADT Guides / Broker setup

Automated trading with Interactive Brokers

ADT connects a local trading service to Interactive Brokers through the TWS API. This guide covers the setup, the operating responsibilities and the limits of that connection.

The supported connection

Automatic Day Trader uses IBKR’s official TWS API through IB Gateway or Trader Workstation running locally. You authenticate inside the broker software. ADT connects to the configured local socket; it does not ask for your IBKR username or password.

The current ADT workflow supports eligible US stocks and broad ETFs, long-only whole-share positions and a configurable maximum of entries per session. Broker API capabilities extend beyond that scope, but API support does not mean ADT implements every instrument or strategy.

Interactive Brokers is a third-party broker. ADT is independently developed software; compatibility does not imply partnership, certification or endorsement. IBKR controls account eligibility, permissions, data and order handling. Its TWS API documentation is the primary reference for the broker interface.

Before configuring ADT

Have the current ADT build and setup instructions, an eligible IBKR account with paper access, the required trading permissions and appropriate API market-data entitlements. ADT Desktop is built for Mac and Windows: Apple silicon with macOS 13 or later, or Intel/AMD Windows x64. Windows currently uses a testing release that requires target-machine and paper broker-lifecycle validation; review the platform requirements. Access and distribution are guided, rather than an unrestricted public download.

Maintain power, network access and the broker session during operation. The ADT desktop is separate from its background service: closing the window does not stop that service. Neither component can operate on a computer that is off.

Start with a paper account. Check current broker requirements for your region and account type. Do not assume a paper result, a successful connection or a capability check establishes live execution readiness.

Configure Gateway or TWS

  1. Sign in to the intended paper session in IB Gateway or TWS. Confirm the broker itself identifies the session as simulated.
  2. Open the broker’s API settings. Enable socket clients where applicable. Gateway exposes its API connection as part of its operating configuration.
  3. Keep localhost restrictions enabled. The intended connection is local; do not expose the API port to the public internet.
  4. Confirm the socket port. Match ADT to the configured value instead of relying only on a default.
  5. For the intended paper order rehearsal, the API must permit order requests. A read-only API setting blocks order operation. Do not disable it in a live session merely to test connectivity.
  6. In ADT Settings → IBKR, enter the local host and matching port, select a non-conflicting client ID and test the connection.
  7. Confirm the reported account, PAPER mode, capabilities and data mode before running a session.
Broker application Common paper port Common live port
IB Gateway 4002 4001
Trader Workstation 7497 7496

These are conventional defaults, not account-mode guarantees. Ports are editable. ADT relies on broker account information and explicit authorization, not the port number alone. IBKR documents configuration in TWS settings for API use.

Account mode and live authorization

Being connected to a live account does not enable ADT live entry. Live authorization is disabled by default and requires a separate confirmation in Settings → Trading, bound to the exact selected account. A later account change must match the authorization before the system can arm.

Keep the displayed mode visible and verify the intended account directly at the broker. Paper and live environments can differ in permissions and execution behavior. ADT’s risk-control screens show the actual live-authorization and flatten confirmations using isolated demonstration data.

Market data and order capability

A connected API session can still lack live market-data permissions. Review the application’s quote timestamps and live/delayed label, then confirm your account’s API entitlements with IBKR. Subscription charges and eligibility depend on the current broker offering and account classification.

ADT can use a delayed reference for its opening limit path, with limitations. App-side stop updates based on delayed observations also lag. Its marketable-limit entry fallback requires fresh real-time quotes. Read the data guide before interpreting a delayed feed as equivalent to a live one.

Capability and what-if checks can help identify permissions and supported request shapes. They do not place an actual exchange order and do not guarantee a future fill. A broker response must be interpreted according to the check that produced it.

How ADT handles the trading session

Research receives the session envelope before ranking. The engine revalidates each candidate, account readiness, whole-share sizing, existing exposure and aggregate session capacity immediately before entry. It uses whole-share opening limit orders and a conditional capped fallback. Broker fills establish the position. A submitted quantity is not treated as an executed quantity.

Each managed position has independent protection and automatic exit state, including its own high-water mark, stop and broker order references. Where broker-side protection is accepted, ADT displays that authority; application-monitored protection depends on local availability. Scheduled flattening uses the actual exchange-session close, including early closes, but the request remains subject to execution conditions.

After startup or reconnect, ADT requests broker orders, executions, positions and account state before resuming normal operation. The execution page and reconciliation guide explain how those records are used.

Authentication and interruptions

Gateway and TWS have restart and reauthentication behavior of their own. Configure the broker’s supported restart options and plan for required authentication. Do not assume a previously logged-in gateway can remain authenticated indefinitely. Check IBKR’s current daily and weekly reauthentication guidance.

If a connection is lost, inspect the broker directly for positions and working orders. Restore the relevant login or connection and let ADT reconcile. An accepted broker order may continue to work during a local outage, while an app-monitored trigger cannot act without its service and data. Never assume an outage automatically cancels an order or closes a position.

Troubleshoot the layer that failed

Symptom Inspect first What not to assume
Cannot connect Gateway/TWS running, correct host and port, socket access and local permissions That a network connection alone authorizes trading
Client ID conflict Whether another client uses the configured ID That changing IDs resolves existing order ownership
Read-only rejection Intended account mode and API read-only setting That enabling live orders is a connectivity test
Delayed or missing quotes API data entitlement, reported mode and quote timestamp That a working login includes live data
Upstream connection lost Broker connectivity messages and authentication state That every lost connection is a local socket problem
Position mismatch Actual broker position, orders and executions That clearing local records is a safe reset

IBKR’s system messages distinguish lost connectivity from restored connections with or without lost data. Use the exact message and timestamp when diagnosing an incident. Follow ADT’s recovery procedure for intervention and reconciliation.

Questions operators ask

Can ADT use IBKR paper trading?

Yes, the application supports a paper broker account and displays its mode. Rehearse the complete workflow first. IBKR’s simulator has documented limitations, including fill simulation and unsupported order types; it is not a guarantee of live behavior. See IBKR paper-account limitations.

Is a separate broker password stored in ADT?

No. Authentication stays in the locally running IB Gateway or TWS session. Research-provider credentials are a separate configuration stored in the operating system’s credential store.

Does closing ADT close a position?

Closing the UI does not stop the separate service or establish a closed position. Configured exits run automatically. Flatten Position and Flatten All are manual overrides; broker executions and final position evidence establish the outcome. Review the operator controls before using them.

Can other software trade the same account?

IBKR can support multiple API clients under its rules, but overlapping trading activity introduces client-ID, order-ownership and reconciliation considerations. Do not assume unrelated automation or manual activity in the same instrument is compatible with ADT’s defined workflow. Review the environment during guided setup.

Are broker and data fees included?

No. ADT access, guided setup, broker charges, market-data subscriptions and research/search usage are separate categories. Published pricing explains the software package and the proposed workstation’s current status.

Multi-position capacity

The configuration supports up to 100 session entries, validated in software scenarios. The default adapter limits quote subscriptions to 80 and reserves four validation slots, leaving a maximum of 76 active managed lifecycles. Actual broker entitlements, shared quote use, account restrictions and the entry window can reduce this further. Requests are paced, with safety actions prioritized. This is not a verified IBKR paper/live throughput commitment; rehearse the intended scale with your own paper environment.

Evaluating ADT for your own setup?

Review pricing and access requirements