strategy_profit_take

Automate partial stock profit-taking using absolute gain thresholds via Alpaca APIs.

2|4|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/khoks/ClaudeTrading --skill strategy-profit-take
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategy_profit_take
Source: https://github.com/khoks/ClaudeTrading/tree/main/.claude/skills/strategy_profit_take
Command: npx skills add https://github.com/khoks/ClaudeTrading --skill strategy-profit-take

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

This Skill eliminates the manual effort and emotional decision-making of timing partial stock sales to lock in gains, ensuring consistent profit capture for autonomous trading workflows without constant market monitoring.

Core Features & Use Cases

  • Eager Partial Profit-Taking: Automatically sells a fixed fraction of a position when it hits predefined absolute gain thresholds (default 10%, 20%, 35%, 50%) from your cost basis.
  • Seamless Strategy Pairing: Works alongside trailing stop strategies to capture gains both as prices rise (eagerly) and during price reversions (lazily) for full profit realization.
  • Dynamic Threshold Reset: Automatically rebuilds profit thresholds when new buys lower your average cost basis, avoiding double-firing on old price levels.
  • Use Case: For an autonomous paper trading system, automatically scale out of winning positions without manual intervention, while adhering to cooldown rules to avoid pattern-day-trader restrictions.

Quick Start

Invoke this skill as part of your scheduled trading workflow to automatically evaluate your sellable stock positions and place partial sell orders for any holdings that have reached their configured absolute gain thresholds.

Frequently Asked Questions about strategy_profit_take

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate partial profit-taking on stock positions in paper trading?

Automated partial profit-taking evaluates sellable stock positions during scheduled market ticks and places partial sell orders when predefined absolute gain thresholds from cost basis are hit. This secures gains dynamically without manual market monitoring.

What are absolute gain thresholds for scaling out stock positions?

Absolute gain thresholds are predefined percentage rungs from your cost basis, such as 10%, 20%, 35%, and 50%. When a stock price reaches a rung, the system eagerly sells a fixed fraction of the position to lock in gains.

Does automated profit-taking work with Alpaca trading APIs?

Yes, automated profit-taking integrates directly with Alpaca trading APIs for position and order management. It evaluates your held stocks and executes partial sell orders seamlessly within autonomous trading workflows.

How do trading cooldowns prevent pattern day trader restrictions in automated strategies?

Automated trading strategies respect trading cooldown rules to comply with pattern-day-trader restrictions. The system evaluates positions during scheduled market ticks but refrains from placing orders if cooldown periods are active.

What happens to profit thresholds when new stock buys lower my average cost basis?

When new buys lower your average cost basis, the system automatically rebuilds profit thresholds. This dynamic reset uses persistent pool state to track baseline quantities and avoids double-firing sell orders on old price levels.

Can I pair eager profit-taking with trailing stop strategies?

Yes, eager profit-taking works seamlessly alongside trailing stop strategies. This combination captures gains both as prices rise eagerly and during price reversions lazily, ensuring full profit realization across market cycles.