Scalpel
FeaturesCockpitPricingGuidesBlogSign inDownload
All guides
1.Getting started
  • Install Scalpel on Windows
  • Install Scalpel on a Mac
  • Activate your Scalpel licence
  • Connect Scalpel to Interactive Brokers
  • Enable the API in TWS and IB Gateway
  • The IBKR market data you need for Level 2
  • Your first 15 minutes in SIM
  • A tour of the Scalpel cockpit
  • What Scalpel is for, and what it is not
2.Desks and layout
  • Load symbols onto desks
  • Add, remove and resize desks
  • Panel settings: Level 2, tape and chart
  • Set up Scalpel for one, two or three screens
  • Desk badges: DELAYED, NO DATA, STALE and HALTED
3.Reading the market
  • How to read Level 2 in Scalpel
  • Spot iceberg orders on Level 2
  • Read the time and sales tape
  • Hear the tape: tape sound
  • The chart: timeframes, VWAP, EMAs, MACD and delta
  • The read line and the chart read bar
  • Read the players on Level 2: venues, refills and size
4.Placing trades
  • Sizing presets: shares, dollars or risk
  • Trade a fixed dollar risk with Risk (Cents)
  • Hotkeys: the defaults and how to change them
  • Entries: marketable limits, offsets and partial fills
  • Scale out and flatten
  • The order bar and orders panel
5.Stops and targets
  • How Scalpel's stops work
  • Move your stop and target on the chart
  • Breakeven and trailing stops
  • R multiples: how Scalpel measures a trade
  • Stops in the pre-market: why they cannot sit on the book
6.SIM and LIVE
  • Paper trading with SIM
  • Switch to LIVE safely
  • Commissions: pick your IBKR plan
  • Analytics: review your trading
7.Risk controls
  • Set a daily loss limit (the kill-switch)
  • Fat-finger and max-position caps
  • Why Scalpel is long-only
8.Scanner
  • Set up the IBKR scanner
  • Scan types: momentum, running up and setups
  • Scan the pre-market
  • Shares out, short interest and the squeeze score
  • Arrange scan panels
9.Intel: borrow, dilution and catalysts
  • Turn on intel
  • Check a stock for dilution before you buy
  • Borrow, short fees and squeeze setups
  • Why is it moving? Catalyst grading
  • Every intel chip, explained
  • Warrant and offering lines on the chart
  • The dilution entry guard
10.Audio and alerts
  • Voice callouts and sounds
  • Alerts and toasts
11.Settings reference
  • Settings: Connection
  • Settings: Trading
  • Settings: Stops
  • Settings: Risk
  • Settings: Sizing
  • Settings: Appearance
  • Settings: Audio
  • Settings: Hotkeys
  • Settings: Intel
  • Settings: About
12.Licence, updates and account
  • Move your licence to a new computer
  • Updates: how Scalpel updates itself
  • Try new features early: the beta channel
  • Refunds, invoices and billing
  • Earn with the referral program
  • Get help on Discord
13.Troubleshooting
  • Scalpel says Disconnected: fix the IBKR connection
  • TWS is running but not accepting the connection
  • TWS signs out when IB Gateway starts
  • Delayed data, NO DATA or STALE, or Depth unavailable
  • A LIVE order was rejected
  • An order did not fill, or only part filled
  • Scan panels say the IBKR scanner is off or waiting
  • Licence: machine limit reached
  • Licence: Scalpel cannot reach scalpeltrade.com
  • Windows protected your PC: installing Scalpel
  • An update did not install, or Scalpel went back a version
  • The chart or app window is blank
  • The order bar is greyed out
  • No callouts or tape sound
  • Intel shows nothing or SEC filings are off
14.Tips and tricks
  • 40 Scalpel tips for faster, safer scalping
  • A pre-market routine with Scalpel
  • Trade without touching the mouse
  • Settings for a small account
  • Your first week: a SIM practice plan
  • The momentum method Scalpel is built around
15.Glossary
  • Day trading glossary
Scalpelscalpeltrade.comA keyboard-first scalping cockpit for Interactive Brokers.
ProductFeaturesCockpitPricingDownloadFAQ
ResourcesGuidesTroubleshootingGlossaryBlogCompareChangelogAccountRefer a trader
CommunityDiscordYouTube
CompanyAboutFor AI agentsContactTermsPrivacyRefundsRisk

Trading involves substantial risk of loss. Scalpel is software, not investment advice. LIVE mode places real orders in your Interactive Brokers account. No warranty. Simulated or replayed results do not guarantee future results. Scalpel is independent software and is not affiliated with, endorsed by or sponsored by Interactive Brokers LLC. IBKR and TWS are trademarks of their respective owners. Figures shown on this site are demo data, not live quotes. Scalpel is sold by QUITE RIGHT LIMITED, registered in England and Wales, company number 17053815. Copyright 2026.

    All guides
    1.Getting started
    • Install Scalpel on Windows
    • Install Scalpel on a Mac
    • Activate your Scalpel licence
    • Connect Scalpel to Interactive Brokers
    • Enable the API in TWS and IB Gateway
    • The IBKR market data you need for Level 2
    • Your first 15 minutes in SIM
    • A tour of the Scalpel cockpit
    • What Scalpel is for, and what it is not
    2.Desks and layout
    • Load symbols onto desks
    • Add, remove and resize desks
    • Panel settings: Level 2, tape and chart
    • Set up Scalpel for one, two or three screens
    • Desk badges: DELAYED, NO DATA, STALE and HALTED
    3.Reading the market
    • How to read Level 2 in Scalpel
    • Spot iceberg orders on Level 2
    • Read the time and sales tape
    • Hear the tape: tape sound
    • The chart: timeframes, VWAP, EMAs, MACD and delta
    • The read line and the chart read bar
    • Read the players on Level 2: venues, refills and size
    4.Placing trades
    • Sizing presets: shares, dollars or risk
    • Trade a fixed dollar risk with Risk (Cents)
    • Hotkeys: the defaults and how to change them
    • Entries: marketable limits, offsets and partial fills
    • Scale out and flatten
    • The order bar and orders panel
    5.Stops and targets
    • How Scalpel's stops work
    • Move your stop and target on the chart
    • Breakeven and trailing stops
    • R multiples: how Scalpel measures a trade
    • Stops in the pre-market: why they cannot sit on the book
    6.SIM and LIVE
    • Paper trading with SIM
    • Switch to LIVE safely
    • Commissions: pick your IBKR plan
    • Analytics: review your trading
    7.Risk controls
    • Set a daily loss limit (the kill-switch)
    • Fat-finger and max-position caps
    • Why Scalpel is long-only
    8.Scanner
    • Set up the IBKR scanner
    • Scan types: momentum, running up and setups
    • Scan the pre-market
    • Shares out, short interest and the squeeze score
    • Arrange scan panels
    9.Intel: borrow, dilution and catalysts
    • Turn on intel
    • Check a stock for dilution before you buy
    • Borrow, short fees and squeeze setups
    • Why is it moving? Catalyst grading
    • Every intel chip, explained
    • Warrant and offering lines on the chart
    • The dilution entry guard
    10.Audio and alerts
    • Voice callouts and sounds
    • Alerts and toasts
    11.Settings reference
    • Settings: Connection
    • Settings: Trading
    • Settings: Stops
    • Settings: Risk
    • Settings: Sizing
    • Settings: Appearance
    • Settings: Audio
    • Settings: Hotkeys
    • Settings: Intel
    • Settings: About
    12.Licence, updates and account
    • Move your licence to a new computer
    • Updates: how Scalpel updates itself
    • Try new features early: the beta channel
    • Refunds, invoices and billing
    • Earn with the referral program
    • Get help on Discord
    13.Troubleshooting
    • Scalpel says Disconnected: fix the IBKR connection
    • TWS is running but not accepting the connection
    • TWS signs out when IB Gateway starts
    • Delayed data, NO DATA or STALE, or Depth unavailable
    • A LIVE order was rejected
    • An order did not fill, or only part filled
    • Scan panels say the IBKR scanner is off or waiting
    • Licence: machine limit reached
    • Licence: Scalpel cannot reach scalpeltrade.com
    • Windows protected your PC: installing Scalpel
    • An update did not install, or Scalpel went back a version
    • The chart or app window is blank
    • The order bar is greyed out
    • No callouts or tape sound
    • Intel shows nothing or SEC filings are off
    14.Tips and tricks
    • 40 Scalpel tips for faster, safer scalping
    • A pre-market routine with Scalpel
    • Trade without touching the mouse
    • Settings for a small account
    • Your first week: a SIM practice plan
    • The momentum method Scalpel is built around
    15.Glossary
    • Day trading glossary
    Guides/13. Troubleshooting

    Guide 13.2

    TWS is running but not accepting the connection

    Beginner, 4 min read. Checked with Scalpel 1.12.8 on October 15, 2026.

    In short

    The banner means TWS or IB Gateway is up on the port Scalpel uses, but its API is refusing the connection. In TWS open Configure > API > Settings (in IB Gateway, Configure > Settings > API), tick Enable ActiveX and Socket Clients, add 127.0.0.1 to Trusted IPs, click OK, and accept the connection if TWS asks. Scalpel retries by itself and connects within seconds.

    Scalpel found the program (the port answered) but the handshake that follows never completed. That is almost always a setting or a question waiting inside TWS, not a network problem.

    TWS is running on port 7497 but is not accepting the connection. In Configure > API > Settings, enable the API socket and allow Scalpel when it asks.

    With IB Gateway the banner reads "IB Gateway is running on port 4001 but is not accepting the connection. In Configure > Settings > API, enable the API socket and allow Scalpel when it asks." The status bar pill keeps reading Disconnected while Scalpel retries.

    TWS is running on port 7497 but is not accepting the connection. In Configure > API > Settings, enable the API socket and allow Scalpel when it asks.
    D1
    D2
    IBKRDisconnected: session endedv1.12.6 (4f2c9a1)
    The program answered on the port, but refused the API connection. Demo data.

    Fix it

    1. 01

      Look for a waiting question in TWS

      Switch to TWS or IB Gateway and look for a small window asking whether to accept an incoming API connection. It can open behind other windows. Accept it. Scalpel opens several connections (quotes, depth, orders, scanner), so it may ask more than once.

    2. 02

      Enable the API socket

      Open the API settings: in TWS, Configure (the gear, or File > Global Configuration) > API > Settings; in IB Gateway, Configure > Settings > API > Settings. Tick Enable ActiveX and Socket Clients 1.

      Global Configuration (simplified)
      APISettingsPrecautions
      Enable ActiveX and Socket ClientsRead-Only APISocket port7497Allow connections from localhost onlyTrusted IPs127.0.0.1
      1234
      Simplified TWS API settings: Enable ActiveX and Socket Clients 1, Read-Only API off 2, the socket port 3, and 127.0.0.1 as a trusted IP 4. Not the real TWS window.
    3. 03

      Trust this computer

      Under Trusted IPs, click Create and add 127.0.0.1 4. TWS then stops asking every time Scalpel connects. Leave Allow connections from localhost only ticked: Scalpel runs on the same computer.

    4. 04

      Untick Read-Only API

      Read-Only API 2 does not stop the connection, but it makes TWS refuse every order Scalpel sends in LIVE. Untick it now so you do not meet it mid-trade (guide 13.5).

    5. 05

      Click OK and wait a few seconds

      Click OK (or Apply and OK). Scalpel retries by itself; the pill turns green and reads Connected. No restart of Scalpel is needed.

    Still not accepting?

    • Another copy of Scalpel is open, or another program uses Scalpel's API client ids. Close it. The status bar may read "Disconnected: TWS refused the connection (client id in use?), retrying".
    • IB Gateway or TWS has just logged in and is still loading. Give it 30 seconds.
    • A dialog is open in TWS, such as a message after login. Close it; TWS can hold API connections until it is dismissed.
    • The port belongs to something else. The banner checks only that the port answers. If you changed TWS's port, make sure no other program uses the same number.
    • Restart TWS or IB Gateway after changing API settings if nothing else works. Scalpel reconnects by itself when it comes back.

    For the full TWS and IB Gateway setup, see guide 1.5. For other banner messages, see guide 13.1.

    Questions

    Where is Enable ActiveX and Socket Clients?
    In TWS: Configure (or File > Global Configuration) > API > Settings. In IB Gateway: Configure > Settings > API > Settings.
    Why does TWS keep asking me to accept the connection?
    Because 127.0.0.1 is not a trusted IP. Add it under Trusted IPs in the API settings and TWS stops asking.
    Should Read-Only API be on or off?
    Off, if you want to place LIVE orders from Scalpel. With it on, Scalpel connects and shows data but every order is refused.
    Do I need to restart Scalpel after changing TWS settings?
    No. Scalpel retries the connection on its own every few seconds.

    Related guides

    Guide 1.5Enable the API in TWS and IB GatewayTurn on Enable ActiveX and Socket Clients in TWS or IB Gateway, set the socket port, allow 127.0.0.1 and switch off read-only API so Scalpel can trade.Guide 13.1Scalpel says Disconnected: fix the IBKR connectionScalpel cannot reach TWS or IB Gateway? Check the program is running and logged in, the API is on and the port matches, and use the banner's fix.Guide 1.4Connect Scalpel to Interactive BrokersRun TWS or IB Gateway, match the API port and watch Scalpel connect. Which program to use, the ports (7497, 7496, 4001) and what the link banner tells you.
    Previous: 13.1Scalpel says Disconnected: fix the IBKR connectionNext: 13.3 TWS signs out when IB Gateway starts
    Practice in SIM, against the live book.A lifetime license, every update included, with a 7-day refund guarantee.Ask in DiscordGet Scalpel
    Sign in