skillfed

ib-stop-loss

IB Stop-Loss Manager analyzes your Interactive Brokers portfolio and automatically computes and places conditional stop-loss orders for diagonal spreads, naked LEAPS, and stock positions. It runs in dry-run mode by default—no orders execute until you explicitly request it—and supports both paper and live trading accounts. The skill detects positions at risk, identifies orphaned orders, and alerts you when losses approach your threshold.

IB Stop-Loss Manager automates stop-loss order placement for PMCC, naked LEAPS, and stock positions in Interactive Brokers.

AI-generated summary based on this skill's SKILL.md

299 68 MIT updated by staskh

Install

staskh/trading_skills/ib-stop-loss · repository language: Python

git clone https://github.com/staskh/trading_skills
cp -r trading_skills/.claude/skills/ib-stop-loss ~/.claude/skills/ib-stop-loss
npx skillfed install staskh/trading_skills/ib-stop-loss

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is IB Stop-Loss Manager and what does it do?

IB Stop-Loss Manager analyzes your Interactive Brokers portfolio and automatically computes and places conditional stop-loss orders for diagonal spreads, naked LEAPS, and stock positions. It runs in dry-run mode by default—no orders execute until you explicitly request it—and supports both paper and live trading accounts. The skill detects positions at risk, identifies orphaned orders, and alerts you when losses approach your threshold.

How does IB Stop-Loss Manager handle PMCC stop loss orders?

IB Stop-Loss Manager computes and places conditional stop-loss orders specifically for PMCC (Poor Man's Covered Call) diagonal spreads. It monitors both the long and short legs of your position, calculates downside risk, and generates stop-loss triggers tailored to your portfolio's exposure. You can review all proposed orders in dry-run mode before execution.

Can IB Stop-Loss Manager automate conditional order placement and alert detection?

Yes. IB Stop-Loss Manager automates conditional order placement across your Interactive Brokers account and detects alerts when positions breach thresholds. It identifies premium decay on short legs, flags near-strike warnings, and notifies you of orphaned orders—all without executing trades unless you explicitly enable live mode.

Does IB Stop-Loss Manager support dry-run testing before live orders?

IB Stop-Loss Manager runs in dry-run mode by default, allowing you to monitor portfolio downside risk and review all computed stop-loss orders without any live execution. Once you validate the strategy and are confident in the results, you can switch to live mode to place actual orders on Interactive Brokers.

What position types does IB Stop-Loss Manager protect?

IB Stop-Loss Manager manages stop-loss orders for PMCC diagonal spreads, naked LEAPS positions, and stock holdings. It detects premium decay and near-strike alerts for short legs, monitors multiple account types and port configurations, and tailors risk management to each position's structure and your loss threshold.

Is IB Stop-Loss Manager open source and what license does it use?

Yes, IB Stop-Loss Manager is released under the MIT license, making it free to use, modify, and distribute. You can review the source code, adapt it to your needs, and integrate it into your own trading workflows on Interactive Brokers.

SKILL.md

rendered from the published skill — quoted content, verbatim

IB Stop-Loss Manager

Analyzes PMCC (diagonal call spread), naked LEAPS, and stock positions in the IB portfolio and manages conditional stop-loss orders.

Default mode is dry-run — no orders are placed unless --execute is in the request.

IB Connection

TWS or IB Gateway must be running locally with API enabled: - Paper trading — port 7497 - Live trading — port 7496 - IB_PORT env var — default port when --port is omitted (e.g. IB_PORT=4001 for a Gateway container). Precedence: --port flag > IB_PORT > built-in default. Set it in the shell or a .env file.

Port fallback: If the configured port fails, automatically retry on the other port. If the retry succeeds, save to memory which account type worked (live/paper) and reuse it for all IB skill calls in this and future sessions — until the user explicitly asks for the other account. If both ports fail, ask

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
.claude/skills/ib-stop-loss/SKILL.md
.claude/skills/ib-stop-loss/scripts/stop_loss.py

Related skills

Tags

options-risk-management automated-exit-orders portfolio-monitoring conditional-order-placement downside-protection broker-api-integration dry-run-execution multi-leg-strategies