AgentSkillsCN

stop-defense

在Alpaca平台上,通过一键式防御性止损管理,实现盈亏平衡与利润保护。

SKILL.md
--- frontmatter
name: stop-defense
description: One-command defensive stop management for breakeven and profit protection on Alpaca.
metadata: {"openclaw":{"emoji":"🛡️","requires":{"env":["APCA_API_KEY_ID","APCA_API_SECRET_KEY"],"bins":["python3"]}}}

Stop Defense

Use this skill for post-entry risk control.

Move stop to entry (breakeven)

bash
${OPENCLAW_HOME:-$HOME/.openclaw}/tools/alpaca/stop_manager.sh move-stop-entry \
  --symbol <TICKER> --offset-bps 5 --replace

Protect % of profits

bash
${OPENCLAW_HOME:-$HOME/.openclaw}/tools/alpaca/stop_manager.sh protect-profit \
  --symbol <TICKER> --protect-pct 50 --min-gain-pct 0.30 --replace

Interpretation

  • offset-bps: tiny cushion beyond entry to avoid noise stopouts.
  • protect-pct: fraction of unrealized gain to lock with stop.
  • min-gain-pct: only upgrade to profit-protect after enough gain.

Default operating policy:

  • At +0.3% to +0.5% favorable move: move to breakeven.
  • At +1R or clear extension: protect 40-60% gain.
  • As trend matures: protect 60-75% gain.

Stream-trigger use:

  • Trade update fill/partial-fill wake => run move-stop-entry immediately.
  • Price shock wake with open profit => run protect-profit using 40-70% ladder.
  • Always replace old stop orders (--replace).