skillfed

ib-trailing-stop

This skill deploys Interactive Brokers' native TRAIL orders against eligible stock and naked LEAPS positions, letting the broker automatically adjust your stop trigger upward as price rises and lock it as price falls. PMCC positions are excluded to preserve hedge integrity. Dry-run mode is the default—orders only execute when you add the `--execute` flag.

IB Trailing Stop Manager places native TRAIL orders on stocks and naked LEAPS, auto-ratcheting stops as prices climb.

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

299 68 MIT updated by staskh

Install

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

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

Frequently asked questions

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

What does ib-trailing-stop do with Interactive Brokers TRAIL orders?

ib-trailing-stop deploys Interactive Brokers' native TRAIL orders against eligible stock and naked LEAPS positions. The skill lets the broker automatically adjust your stop trigger upward as price rises and lock it as price falls, automating trailing stop loss management without manual intervention.

How do I set trailing stops on stocks with ib-trailing-stop?

ib-trailing-stop places trailing stops by specifying a percentage or dollar amount as the trail distance. The skill applies these settings to your stock and LEAPS positions, and the broker then ratchets the stop upward whenever the price climbs, keeping your downside protection locked in.

Can ib-trailing-stop automate trailing stop loss with percentage or dollar amounts?

Yes. ib-trailing-stop supports both percentage-based and dollar-amount trailing stops. You define your trail distance, and the skill automatically configures TRAIL orders to enforce that distance, adjusting upward as prices rise and holding firm as they fall.

What is dry-run mode in ib-trailing-stop and how do I execute live?

ib-trailing-stop defaults to dry-run mode, letting you preview and validate trailing stop orders before they go live. To execute orders against your account, add the `--execute` flag. This safety-first approach prevents accidental live trades during testing.

Does ib-trailing-stop manage PMCC positions and stop loss separately?

ib-trailing-stop excludes PMCC (poor man's covered call) positions to preserve hedge integrity. The skill focuses on naked stock and LEAPS positions, managing their trailing stops separately so your hedged strategies remain unaffected.

How does ib-trailing-stop track and update existing trailing stops?

ib-trailing-stop monitors your existing TRAIL orders and updates them as prices climb. The skill tracks price movement and ensures your stop triggers ratchet upward in real time, locking in gains while maintaining your chosen trail distance below the current price.

SKILL.md

rendered from the published skill — quoted content, verbatim

IB Trailing Stop Manager

Places IB native TRAIL orders against stocks and naked LEAPS in the portfolio. IB auto-adjusts the stop trigger as the price climbs and locks it as price falls.

PMCC positions are intentionally excluded — use ib-stop-loss for those (a standalone trailing stop on the PMCC long leg would break the hedge at trigger).

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

(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-trailing-stop/SKILL.md
.claude/skills/ib-trailing-stop/scripts/trailing_stop.py

Related skills

Tags

risk-management order-automation broker-integration position-tracking stop-loss-strategy native-orders portfolio-protection price-ratcheting execution-control