ib-trailing-stop

Installation
SKILL.md

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.
Installs
25
GitHub Stars
334
First Seen
Jun 6, 2026
ib-trailing-stop — staskh/trading_skills