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.1

    Scalpel says Disconnected: fix the IBKR connection

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

    In short

    Scalpel reaches Interactive Brokers only through TWS or IB Gateway running and logged in on the same computer, with the API switched on and its socket port matching Settings > Connection > Port. While the link is down, a banner under the header says which program it found (TWS on 7497 or 7496, IB Gateway on 4001 or 4002) and offers a one-click fix: Use port 7496, Use IB Gateway or Start TWS.

    The IBKR pill at the bottom left of the status bar shows the link. Anything other than Connected means no quotes, no Level 2 and no orders.

    IBKRConnected
    Connected: quotes, depth and orders flow
    IBKRConnecting
    Trying to reach TWS or IB Gateway
    IBKRDisconnected: connection refused
    Nothing answering, with the reason
    IBKROff
    Switched off by you: click to connect
    The IBKR pill's four states. Click it to switch the link off or on. Demo data.

    The text after Disconnected: is the reason your computer gave. On Windows, "No connection could be made because the target machine actively refused it" means nothing is listening on that port: the program is closed, still logging in, or on another port.

    Check these first

    1. 01

      Log in to TWS or IB Gateway

      Start TWS or IB Gateway on this computer and finish logging in, including the two-factor approval on your phone. The API only opens once the login is complete.

    2. 02

      Turn the API on

      In TWS: Configure > API > Settings > Enable ActiveX and Socket Clients. In IB Gateway: Configure > Settings > API. Every screen is in guide 1.5.

    3. 03

      Match the port

      The Socket port there must equal Port in Scalpel's Settings > Connection. Scalpel starts on 7497 for TWS and 4001 for IB Gateway. Change either side, then click Apply: Scalpel reconnects without a restart.

    4. 04

      Make sure the pill is not Off

      Off (grey) means you switched the link off. Click the pill, or tick Enabled next to IBKR TWS in Settings > Connection. While it is off, Scalpel does not retry and shows no banner.

    Then read the banner under the header. It is checked every 5 seconds while the link is down, and only when Host is this computer (127.0.0.1).

    Neither TWS nor IB Gateway is running on this machine. Start one and log in; Scalpel connects by itself.

    Nothing answers on 7497, 7496, 4001 or 4002. If Scalpel finds TWS or IB Gateway installed in its usual place, the banner offers Start TWS or Start IB Gateway. Click one, log in, and Scalpel connects by itself ("Starting TWS: log in, then Scalpel connects").

    Neither TWS nor IB Gateway is running on this machine. Start one and log in; Scalpel connects by itself.Start IB GatewayStart TWS
    D1
    D2
    IBKRDisconnected: connection refusedv1.12.6 (4f2c9a1)
    Nothing running: the banner offers to start what is installed, and the pill reads Disconnected. Demo data.

    If TWS is running and logged in but you still see this, its API is off or uses a port outside the four standard ones. Turn the API on, or type its port into Settings > Connection.

    TWS is not answering on port 7497, but it is running on port 7496.

    The most common one. Interactive Brokers sets TWS to port 7496 for a live login and 7497 for a paper login; Scalpel starts on 7497. Click Use port 7496 1: Scalpel saves the port and connects ("Connecting to TWS on port 7496"). Or change TWS's socket port to 7497.

    TWS is not answering on port 7497, but it is running on port 7496. Switch to it, or change the socket port in Configure > API > Settings.Use port 7496
    D1
    D2
    IBKRDisconnected: connection refusedv1.12.6 (4f2c9a1)
    1
    One click switches Scalpel to the port TWS is really using 1. Demo data.

    The same happens for IB Gateway on 4001 (live) and 4002 (paper).

    TWS is not answering on port 7497, but IB Gateway is running on port 4001.

    You run the other program. Click Use IB Gateway (or Use TWS) to switch.

    TWS is not answering on port 7497, but IB Gateway is running on port 4001.Use IB Gateway
    D1
    D2
    IBKRDisconnected: connection refusedv1.12.6 (4f2c9a1)
    The other program is up: switch to it. Demo data.

    With a custom port the banner reads "Nothing answers on port 7500, but IB Gateway is running on port 4001." and offers the same switch.

    TWS is running on port 7497 but is not accepting the connection.

    The port is open but the API refuses Scalpel. See guide 13.2.

    Disconnected mid-session: IB connection lost

    An amber toast IB connection lost and a spoken alert mean the link dropped while you were trading: TWS or IB Gateway closed, restarted (both restart once a day unless you set auto-restart), or another login took the session (guide 13.3). Scalpel retries by itself, every few seconds and at least every 20, and picks your LIVE positions back up from Interactive Brokers when it reconnects.

    This can cost you money

    While the link is down, Scalpel gets no prices, so it cannot see your stop being hit, and it cannot send orders. Your LIVE position is still open at Interactive Brokers. If you cannot reconnect quickly, manage it in TWS or the IBKR app. See guide 5.1.

    Disconnected: TWS refused the connection (client id in use?), retrying

    TWS turned the connection away. Usually a second copy of Scalpel is open, another API program on this computer uses the same client ids, or Scalpel restarted a moment ago and TWS has not released the old connection yet. Close the other copy or program; otherwise wait a minute, and Scalpel retries by itself.

    Questions

    Why does Scalpel say Disconnected when TWS is open?
    TWS must be fully logged in with Enable ActiveX and Socket Clients ticked, and its socket port must match Settings > Connection > Port. Live TWS uses 7496 by default and Scalpel starts on 7497: click Use port 7496 on the banner.
    Which port does Scalpel use?
    7497 for TWS and 4001 for IB Gateway at first. Interactive Brokers' defaults are TWS 7496 live and 7497 paper, IB Gateway 4001 live and 4002 paper. Scalpel checks all four and offers to switch.
    Can Scalpel connect to TWS on another computer?
    Scalpel is built to run next to TWS or IB Gateway on the same computer, and the banner's checks only work for 127.0.0.1.
    Do my stops work while Scalpel is disconnected?
    No. Stops are watched by Scalpel and need live prices. The position stays open at Interactive Brokers, so manage it in TWS if the link does not come back.

    Related guides

    Guide 13.2TWS is running but not accepting the connectionThe banner says TWS or IB Gateway is running but not accepting the connection: enable the API socket, allow Scalpel or trust 127.0.0.1, and reconnect.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 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: 12.6Get help on DiscordNext: 13.2 TWS is running but not accepting the connection
    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